/[monit]/monit/util.c
ViewVC logotype

Diff of /monit/util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49 by martinp, Tue Dec 17 20:20:57 2002 UTC revision 1.50 by hauk, Thu Dec 19 20:50:06 2002 UTC
# Line 94  void error(const char *format, ...) { Line 94  void error(const char *format, ...) {
94    vsnprintf(msg, 1024, format, ap);    vsnprintf(msg, 1024, format, ap);
95    va_end(ap);    va_end(ap);
96        
97    if(have_tty) {    if(Run.have_tty) {
98            
99      fprintf(stderr,"%s", msg);      fprintf(stderr,"%s", msg);
100      fflush(stderr);      fflush(stderr);
# Line 1043  void redirect_stdfd() { Line 1043  void redirect_stdfd() {
1043    
1044    int i;    int i;
1045        
1046    have_tty= FALSE;    Run.have_tty= FALSE;
1047    for(i= 0; i < 3; i++)    for(i= 0; i < 3; i++)
1048        if(close(i) == -1 || open("/dev/null", O_RDWR) != i)        if(close(i) == -1 || open("/dev/null", O_RDWR) != i)
1049        error("Cannot reopen standard file descriptor (%d) -- %s\n", i, STRERROR);        error("Cannot reopen standard file descriptor (%d) -- %s\n", i, STRERROR);

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26