aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* daemon: include glib.h on WIN32 for g_error()Max Kellermann2010-05-181-0/+1
|
* Update copyright notices.Avuton Olrich2009-12-311-1/+1
|
* daemon: daemonize_close_stdin() optimised.Michal Nazarewicz2009-07-221-0/+5
| | | | | | | | | | | | | | | | | | Changed function to first close standard input (this may fail but we don't care) and then try to open /dev/null (this may fail but it shouldn't on Unix platforms plus we don't know what to do in such case anyways). Since standard input has the "zeroth" descriptor number next "open" will use it. Since there is no "/dev/null" on Windows (It's not even a valid path!) the second step is skipped if WIN32 is defined. As a final touch, since the function consists of merely two function calls it has been moved to header file and declared static inline. [mk: un-inline daemonize_close_stdin()]
* daemon: Moved empty Windows version functions to header fileMichal Nazarewicz2009-07-191-0/+30
| | | | | | | On Windows only daemonize_close_stdin() function does something. Other functions are either empty or generate an error. Those have been moved to header file and declared static inline so compiler can remove the call all together.
* daemon: added "group" configuration optionMichal Nazarewicz2009-07-191-1/+1
| | | | | | | | | | | | | The "group" configuration option is similar to "user" as it sets user set what group MPD shall run as. With "user" option, MPD changed GID to the GID of the user, however, more control could be desired. Moreover, the patch changes the way of checking whether no setuid(2)/setgid(2) is required -- previously user names were compered, now UID and GIDs are compered (ie. the one we already have (getuid(2)/getgid(2)) with the one we want to change to).
* all: Update copyright header.Avuton Olrich2009-03-131-4/+5
| | | | | | | | This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
* daemon: pass "detach" flag to daemonize()Max Kellermann2009-01-181-2/+2
| | | | | This way, we don't have to pass the full "Options" object to daemonize().
* daemon: added daemonize_init(), daemonize_finish()Max Kellermann2009-01-181-6/+6
| | | | | | The constructor/destructor functions parse and free the configuration properly. This way, we don't have to load the pid file path more than once.
* main: moved code to daemon.cMax Kellermann2009-01-181-0/+19
| | | | | Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to daemon.c. These are daemonization functions.
* listen: moved redirect_stdin() to daemon.cMax Kellermann2008-12-301-0/+6
| | | | | redirect_stdin() is a daemonization function, and disconnecting from the standard input is always a good idea for MPD.
* main: moved daemonize() to daemon.cMax Kellermann2008-12-301-0/+27