Re: initscripts bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sergey wrote:
> Just found a bug in netplugd after having traced it with strace. netplugd is a 
> network plug-in/out monitoring daemon, performing the specified actions when 
> such an event comes up. Comes with net-tools rpm.
> 
> Alright, now the bug. Try to start/restart netplugd from a terminal:
> /sbin/service netplugd restart or /etc/init.d/netplugd restart. Starts up 
> well. Good. Now start mc and run the above command again. It hangs up. Strace 
> comes with:
> 
> [pid  9404] write(1, "/etc/netplug.d/netplug eth0 prob"..., 46) = ? 
> ERESTARTSYS (To be restarted)
> [pid  9404] --- SIGTTOU (Stopped (tty output)) @ 0 (0) ---
> [pid  9404] --- SIGTTOU (Stopped (tty output)) @ 0 (0) ---
> 
> The cloned process is T (stopped).
> 
> # ps axu | grep netplugd
> root      9699  0.0  0.1   1548   412 pts/2    S+   14:23   0:00 netplugd
> root      9700  0.0  0.0   1552   252 pts/2    T    14:23   0:00 netplugd
> 
> I am not sure why mc causes such a stop, anyway it is somehow related to 
> terminal. What if such a script hangs up on a remote system reboot? Bad...
> 

It stopped because it tried to write to the terminal while in the
background.

When a process running in the background tries to perform output on the
terminal, it is sent a SIGTTOU, causing it to stop.

I think you're seeing this as a side effect of how mc is running the
command. Of course, a demon shouldn't really be doing any terminal IO
anyway, so it may still indicate a bug in netplugd.

Kind regards,

Bryn.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDlXgG6YSQoMYUY94RAsCOAKCeBsrSE+japcUIJOXkWtbEk2nHAACeJ2Qs
wCmMVgxn7H4+A7BIJih61zY=
=ZkeM
-----END PGP SIGNATURE-----


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux