hi all, i use ubuntu 11.04
Code:
int main (int argc, char* argv[])
{
/* Open a file descriptor to the device specified on the command line.
int fd = open (argv[1], O_RDONLY);
/* Eject the CD-ROM. */
ioctl (fd, CDROMEJECT);
/* Close the file descriptor.
Is there a way to have KDEWallet close when I lock my laptop? Usually I have the wallet set to close when the last program using it exits, but I tend to leave Chromium open so it holds the wallet open as well. I'd like to be able to force the wallet closed when I lock my laptop (or maybe even close the lid). Is there a way to do this?
Hi
Got my S4 yesterday and already it's got a glitch. When I open/look at a photo in Facebook or the store to its biggest size, I then can't close it back to original without having to shut the phone down and re open the app.
Any suggestions welcome
Hedgey
# This Perl script open connection and call domains
# $jar stands for path of jmxterm jar file
open JMX, "| java -jar jmxterm-1.0-alpha-4-uber.jar -n"; // jmx jar file
#print JMX "help \n";
my $host = "127.0.0.1"; // hostname
my $port = 7199; //jmx port number
print JMX "open $host:$port\n";
#print JMX "domains\n";
print JMX "domain org.apache.cassandra.request\n";
print JMX "bean type=ReadRep
I do unlock and then close.
One process appends records ABCDEFGHIJ.
Another process reads the same file and writes ZZZZ.
Normal file should be
ZZZZ
ABCDEFGHIJ
But only once I have seen the following:
ZZZZEFGHIJ
It seems my locking does not work.
But I tested it.
Code:
while ((numRead = read(inputFd, buf, BUF_SIZE)) > 0)
if (write(outputFd, buf, numRead) != numRead)
fatal("couldn't write whole buffer");
if (numRead == -1)
errExit("read");
if (close(inputFd) == -1)
errExit("close input");
if (close(outputFd) == -1)
errExit("close output");
exit(EXIT_SUCCESS);
since:
Code:
#ifndef BUF_S
I'm developing an app with sqlite, but I don't know when I should open and close my database.
Is it good practice maintain the database open while app is running?
Should I open and close the database just when I'm reading/writing there?
Does it matter?
I'm trying to strengthen my server's security. I have a pretty standard CentOS VPS setup.
Below is a list of both TCP and UDP ports configured in my CSF firewall. These ports were open by default since I got my server. I have compiled as much information about these as I can find.
Some ports are obvious to me and I should keep them open (HTTP, POP, cPanel, etc).
It might sound ridiculous, but I want to prevent closing a window in Ubuntu. I want to provide to my users a highly secure environment, without any desktop environment with just one window open. Now I want to make sure user can't close that window. Is there any way to hack around with compiz so that there is no way a user can close the window.