Sponsored Content
Top Forums UNIX for Advanced & Expert Users Needs help in launching a console application with the help of daemon process Post 302484937 by citaylor on Monday 3rd of January 2011 05:21:44 PM
Old 01-03-2011
Perhaps the application is expecting there to be a stdout/stderr file descriptor - instead of the close you could try:
Code:
int fd=open("/dev/null",O_WRONLY);
if(fd >=0) {
    dup2(fd,STDOUT_FILENO);
    dup2(fd,STDERR_FILENO);
    close(fd);
}

Obviously on Linux you want to open "/dev/null", but I guess on windows that would be "nul"...
 

7 More Discussions You Might Find Interesting

1. Programming

Daemon process

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)
Discussion started by: s_chordia
2 Replies

2. Programming

What is a daemon process?

This is gonna seem really silly to almost evryone here - but I need to know : what is a daemon process? Thanks (6 Replies)
Discussion started by: Kanu77
6 Replies

3. Linux

daemon process

how i will write the daemon process,if any body have sample daemon process send me. (1 Reply)
Discussion started by: suresh_rupineni
1 Replies

4. Red Hat

Problem launching process as BG with &

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)
Discussion started by: hansini
1 Replies

5. Programming

Show progress in console application

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)
Discussion started by: msaqib
3 Replies

6. UNIX for Advanced & Expert Users

Launching a process in remote machine

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)
Discussion started by: karthigayan
3 Replies

7. Programming

Daemon process

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
gnome-settings-daemon(1)					   User Commands					  gnome-settings-daemon(1)

NAME
gnome-settings-daemon - manages the user settings for the GNOME desktop SYNOPSIS
gnome-settings-daemon DESCRIPTION
This daemon, which is started by gnome-session, manages some of the user settings for the desktop, such as the font, keyboard and mouse be- haviour; sound preferences; the background management if nautilus is not running; custom keybindings handling; and so on. OPTIONS
None. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of gnome-settings-daemon: NLSPATH. EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-settings-Themcommand-line executable for the application. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-desktop-prefs | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform. NOTES
Written by Erwann Chenede, Sun Microsystems Inc., 2003. SunOS 5.10 2 Oct 2003 gnome-settings-daemon(1)
All times are GMT -4. The time now is 03:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy