Perhaps the application is expecting there to be a stdout/stderr file descriptor - instead of the close you could try:
Obviously on Linux you want to open "/dev/null", but I guess on windows that would be "nul"...
Hi,
I have to write a daemon process, which performs certain operations in the background.
Now since it performs operations in the background, it should not display anything to the standard output.
The problem is that it still displays, text on standard output.
Can anyone tell me (it is... (2 Replies)
After i launch the process as back ground, when I try to grab the shell by sending the enter, process is going to Stopped state.
How do I successfully run the job in bg with &.
Thanks in Advance (1 Reply)
Hi all
I have a program in C++ that I compiled on Ubuntu 9.0 and Centos 5, after I got it running on Windows. In this program, I show progress of a process using the following construct:
i = 0;
quantum = floor(total_iterations, 100);
perc = 0;
do
{
remain = fmod(i, quantum);
... (3 Replies)
Hi all,
Normally to launch a process in the remote machine I will use ssh to the machine and launch the process.I want to launch the remote machine process with out login into the machine . Is there any way.
It may be any workaround method.
Thanks in advance .:) (3 Replies)
I wish to make a process run in the background, but only one instance of it, and not many,
so when the program is loaded, it has to check whether another instance of the same
program is running and if so to exit. How do I do this ? (4 Replies)
Discussion started by: sundaresh
4 Replies
LEARN ABOUT FREEBSD
fd
FD(4) BSD Kernel Interfaces Manual FD(4)NAME
fd, stdin, stdout, stderr -- file descriptor files
DESCRIPTION
The files /dev/fd/0 through /dev/fd/# refer to file descriptors which can be accessed through the file system. If the file descriptor is
open and the mode the file is being opened with is a subset of the mode of the existing descriptor, the call:
fd = open("/dev/fd/0", mode);
and the call:
fd = fcntl(0, F_DUPFD, 0);
are equivalent.
Opening the files /dev/stdin, /dev/stdout and /dev/stderr is equivalent to the following calls:
fd = fcntl(STDIN_FILENO, F_DUPFD, 0);
fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
fd = fcntl(STDERR_FILENO, F_DUPFD, 0);
Flags to the open(2) call other than O_RDONLY, O_WRONLY and O_RDWR are ignored.
IMPLEMENTATION NOTES
By default, /dev/fd is provided by devfs(5), which provides nodes for the first three file descriptors. Some sites may require nodes for
additional file descriptors; these can be made available by mounting fdescfs(5) on /dev/fd.
FILES
/dev/fd/#
/dev/stdin
/dev/stdout
/dev/stderr
SEE ALSO tty(4), devfs(5), fdescfs(5)BSD June 9, 1993 BSD