Re: [systemd-devel] [PATCH 2/2] Adding binary to shutdown the system

2010-10-07 Thread Harald Hoyer
On 10/06/2010 04:15 PM, Gustavo Sverzut Barbieri wrote: From: Fabiano Fidencio This functions are working as follows: - Send a SIGTERM to all processes that may be finished - Send a SIGKILL to all processes that still live and may be finished - Try to unmount all mount points

[systemd-devel] [PATCH 2/2] Adding binary to shutdown the system

2010-10-06 Thread Gustavo Sverzut Barbieri
From: Fabiano Fidencio This functions are working as follows: - Send a SIGTERM to all processes that may be finished - Send a SIGKILL to all processes that still live and may be finished - Try to unmount all mount points - Try to remount read-only all mount points that can't be um

Re: [systemd-devel] [PATCH 2/2] Adding binary to shutdown the system

2010-10-06 Thread Lennart Poettering
On Wed, 06.10.10 02:05, Gustavo Sverzut Barbieri (barbi...@profusion.mobi) wrote: > +static int send_signal(int sign) { > +sigset_t mask, oldmask; > +usec_t until; > +int processes; > +struct timespec ts; > + > +sigemptyset(&mask); Minor nitpick: I tend to

Re: [systemd-devel] [PATCH 2/2] Adding binary to shutdown the system

2010-10-06 Thread Lennart Poettering
On Wed, 06.10.10 14:25, Karel Zak (k...@redhat.com) wrote: > > +if (need_swapoff) { > > +log_info("Disabling Swaps"); > > +r = swapoff_all(); > > +if (r == 0) > > +need_swapoff =

Re: [systemd-devel] [PATCH 2/2] Adding binary to shutdown the system

2010-10-06 Thread Karel Zak
On Wed, Oct 06, 2010 at 02:05:44AM -0300, Gustavo Sverzut Barbieri wrote: > +/* umount all mountpoints, swaps, and loopback devices */ > +retries = FINALIZE_ATTEMPTS; > +while (need_umount || need_swapoff || need_loop_detach) { > +if (need_umount) { > +

Re: [systemd-devel] [PATCH 2/2] Adding binary to shutdown the system

2010-10-05 Thread Gustavo Sverzut Barbieri
On Wed, Oct 6, 2010 at 2:05 AM, Gustavo Sverzut Barbieri wrote: > From: Fabiano Fidencio > > This functions are working as follows: >    - Send a SIGTERM to all processes that may be finished >    - Send a SIGKILL to all processes that still live and may be finished >    - Try to unmount all moun

[systemd-devel] [PATCH 2/2] Adding binary to shutdown the system

2010-10-05 Thread Gustavo Sverzut Barbieri
From: Fabiano Fidencio This functions are working as follows: - Send a SIGTERM to all processes that may be finished - Send a SIGKILL to all processes that still live and may be finished - Try to unmount all mount points - Try to remount read-only all mount points that can't be um

[systemd-devel] [PATCH 2/2] Adding binary to shutdown the system

2010-10-05 Thread Gustavo Sverzut Barbieri
From: Fabiano Fidencio This functions are working as follows: - Send a SIGTERM to all processes that may be finished - Send a SIGKILL to all processes that still live and may be finished - Try to unmount all mount points - Try to remount read-only all mount points that can't be um