answersLogoWhite
Computer Programming
Windows 98
Unix

How do you create a daemon process in UNIX?

717273

Top Answer
User Avatar
Wiki User
2011-02-18 05:22:00
2011-02-18 05:22:00
In Unix, with a C program you can run a quick function to do this. There is an example at:

(link moved to link section)

AnswerIn Solaris, you need to disconnect your program from your "terminal" ( scripts generally inherit the stdin, stdout, and stderr of your shell when you execute them ). For a shell program you can execute "nohup $program < /dev/null > /dev/null 2>&1 &". Or the shell program can redirect its own stdin, stdout, and stderr -- then you can execute "nohup $program &".
1

Related Questions

User Avatar

The word daemon is a word of Greek derivation meaning "worker". Daemon processes in Unix are background tasks that do things, such as printing, networking, task scheduling, etc.

User Avatar

Any Linux/Unix process that runs in the background is called a 'daemon' process. The word derives from the Greek meaning "worker".

User Avatar

A daemon, not daemond, is a program or server application that runs in the background, possibly started during the boot process. A daemon is analogous to what is referred to as a 'service' in the Windows world.

User Avatar

A daemon process is a background service, running as a disconnected process. This means it does not have a terminal interface with an output screen or a keyboard. These services run network processes, job scheduling, etc.

User Avatar

A daemon is typically spawned as a detached thread.

User Avatar

LInux (and Unix) really don't differentiate between different "types" of daemons. A daemon is a background worker service process. It can do many things, such as networking, database,etc.

User Avatar

Background processes are tied to a terminal's job control, while a daemon runs headless. When the terminal is killed or the user is logged out, the process dies. A daemon does not need the user to be logged in.

User Avatar

To create a Free OS like the UNIX Operating System, They wanted to create a system that was like UNIX without all of the intellectual property issues that UNIX had. (UNIX was proprietary software).

User Avatar

First off. A daemon is usually a name for a sever or service in Unix. The word daemon was originally used to describe FreeBSD network services (as their logo is a daemon). However the term has become more widely adopted through networking and many cross platform services user the term. A mailer daemon is a more technical term for "email server". If a message fails to be delivered, the daemon will return it to you along with an error message, the route it took and where it failed.

User Avatar

A process is a piece of code running on a Unix server. The code is programmed to do a specific job.

User Avatar

using touch command of UNIX. syntax touch &lt;filename&gt; will create dummy regular file.

User Avatar

CUPS (Common Unix Printing System) is a daemon that controls printer drivers, print jobs, and network sharing.

User Avatar

The vertical bar symbol '|' causes a pipe to be created that connects the output of one process to the input of another.

User Avatar

Unix configuration is the process of tailoring a freshly installed version of Unix to your particular environment. Each Unix system may do that differently.

User Avatar

For Unix, any command is run as a sub-process. You don't need an actual command to create the subprocess. You can also force the process to run in the background by appending a '&amp;' symbol at the end of the command.

User Avatar

There is no the system file. There are many files necessary to create a working Unix system.

User Avatar

Any Java thread can be a daemon thread. Daemon threads are service providers for other threads running in the same process as the daemon thread. For example, the HotJava browser uses up to four daemon threads named "Image Fetcher" to fetch images from the file system or network for any thread that needs one. The run() method for a daemon thread is typically an infinite loop that waits for a service request. When the only remaining threads in a process are daemon threads, the interpreter exits. This makes sense because when only daemon threads remain, there is no other thread for which a daemon thread can provide a service. To specify that a thread is a daemon thread, call the setDaemon() method with the argument true. To determine if a thread is a daemon thread, use the accessor method isDaemon().

User Avatar

A true daemon process is disconnected from its parent, so it won't receive a kill signal if the parent dies. It becomes an independent entity after startup.

User Avatar

vsftpd is an FTP server for unix-like systems that is specially built to be efficient and very secure (very secure FTP daemon).

User Avatar

Unix is inherently portable; this means that a program, script, or process may be moved from Unix system to Unix system with little effort or change (hence - portable).

User Avatar

The 'tee' command creates one for you automatically. You would use it to simultaneously look at output from a process and redirect it to a disk file (for example).

User Avatar

When you execute a program on your UNIX system, the system creates a special environment for that program. This environment contains everything needed for the system to run the program as if no other program were running on the system. Each process has process context, which is everything that is unique about the state of the program you are currently running. Every time you execute a program the UNIX system does a fork, which performs a series of operations to create a process context and then execute your program in that context. The steps include the following: Allocate a slot in the process table, a list of currently running programs kept by UNIX. Assign a unique process identifier (PID) to the process. iCopy the context of the parent, the process that requested the spawning of the new process. Return the new PID to the parent process. This enables the parent process to examine or control the process directly. After the fork is complete, UNIX runs your program.

User Avatar

Usually any orphaned process is owned by the 'init' process (process #1)

User Avatar

If you are talking about daemon's from Phillip Pullman's 'The Golden Compass', then you do not make your daemon, you simply have to start being aware of it's presence. You can always go to the link below [REMOVED] for more information :3


Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.