music player daemon (fork)
bfed1c04cc
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()] |
||
---|---|---|
doc | ||
m4 | ||
scripts | ||
src | ||
test | ||
.gitignore | ||
AUTHORS | ||
autogen.sh | ||
configure.ac | ||
COPYING | ||
INSTALL | ||
Makefile.am | ||
NEWS | ||
README | ||
UPGRADING | ||
valgrind.suppressions |
Music Player Daemon (MPD) http://www.musicpd.org A daemon for playing music of various formats. Music is played through the server's audio device. The daemon stores info about all available music, and this info can be easily searched and retrieved. Player control, info retrieval, and playlist management can all be managed remotely. For basic installation information see the INSTALL file. MPD is released under the GNU General Public License version 2, which is distributed in the COPYING file. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.