On Debian stable, python 2.6.4
I have a script that overwrites /dev/null.
Any idea as to what could be happening?
The only thing I have is a typical cron job that redirects output to /dev/null, but that should not cause that, right?
|
On Debian stable, python 2.6.4 I have a script that overwrites /dev/null. Any idea as to what could be happening? The only thing I have is a typical cron job that redirects output to /dev/null, but that should not cause that, right? |
|||
| show 7 more comments |
|
My guess is that some script running with root rights is moving its output into place. So it does something like
|
|||||||
|
|
Once /dev/null has been clobbered once, any attempt to write to it will replace it with a file. You have to recreate it using mknod. Ok, I take that back - Debian stable uses udev, so you can recreate the stuff in /dev just by rebooting. Back when men were men and Sun OS required to you recompile if you wanted more semaphores, a group of us spend some time trying to figure out why one part of our program was giving strange answers, until we realized that stdin was directed from /dev/null, and /dev/null had been replaced by a normal file, so every time it ran it got as input whatever had been output the last time somebody ran a program with the output redirected from /dev/null. |
|||||||||||
|
linuxinstead ofpythonanddebian. – Jo Liss Jan 2 '11 at 18:28