[systemd-devel] Why do we must use the close_all_fds(3) function in some files?

Geunsik Lim geunsik.lim at gmail.com
Mon Jun 16 05:32:55 PDT 2014


Hi all,

Recently, i checked that there are  some of the "close_all_fds" functions
as follows
Why we Systemd run this functions? Whey this functions need Systemd's
management?

invain at u1204lgs:/sandbox/tizentvfolder/systemd$ grep -R "close_all_fds" ./*
./src/nspawn.c:                close_all_fds(NULL, 0);
./src/util.c:int close_all_fds(const int except[], unsigned n_except) {
./src/util.c:        close_all_fds(NULL, 0);
./src/main.c:                close_all_fds(NULL, 0);
./src/spawn-agent.c:                close_all_fds(NULL, 0);
./src/execute.c:                err = close_all_fds(socket_fd >= 0 ?
&socket_fd : fds,
./src/execute.c:                err = close_all_fds(fds, n_fds);
./src/util.h:int close_all_fds(const int except[], unsigned n_except);


Thanks reading.


----
Best regards,
Geunsik Lim, Samsung Electronics
http://leemgs.fedorapeople.org
----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140616/4d096dd5/attachment.html>


More information about the systemd-devel mailing list