in reply to print or die?
I think there may be a better way to do this (other more knowledgeable monks here would chime in) - but have you looked at sigtrap pragma? Adding a die to every print seems kludgy to me.
Normally, when you have a full disk, you'd encounter a ENOSPC on *nix systems. If you're specifically looking for this signal, you can install an handler to trap it and break out. Otherwise, you can use a 'catchall' untrapped handler on other signals (Do note that this can modify behaviour on other signals that are supposed to do their work :-)).
There may well be a better way to do this...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print or die?
by dave_the_m (Monsignor) on Mar 14, 2014 at 19:04 UTC | |
by robby_dobby (Hermit) on Mar 18, 2014 at 14:56 UTC |