From: Mike Taylor Date: Thu, 10 Apr 2008 08:13:29 +0000 (+0000) Subject: Verbose output written to stderr instead of stdout. X-Git-Tag: CPAN-v1.02~329 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=0718e2be40e7ca0bac8c0a6c895d01314f78157e Verbose output written to stderr instead of stdout. --- diff --git a/bin/setrlimit.c b/bin/setrlimit.c index 0efa41a..b08d2dc 100644 --- a/bin/setrlimit.c +++ b/bin/setrlimit.c @@ -1,4 +1,4 @@ -/* $Id: setrlimit.c,v 1.3 2007-08-14 10:17:11 mike Exp $ */ +/* $Id: setrlimit.c,v 1.4 2008-04-10 08:13:29 mike Exp $ */ /* * A simple wrapper program for the setrlimit(2) system call, which @@ -99,13 +99,13 @@ int main(int argc, char **argv) { new.rlim_max = n; if (verbose) { if (new.rlim_cur != old.rlim_cur) - printf("%s: changing soft %s from %ld to %ld\n", - argv[0], types[i].name, - (long) old.rlim_cur, (long) new.rlim_cur); + fprintf(stderr, "%s: changing soft %s from %ld to %ld\n", + argv[0], types[i].name, + (long) old.rlim_cur, (long) new.rlim_cur); if (new.rlim_max != old.rlim_max) - printf("%s: changing hard %s from %ld to %ld\n", - argv[0], types[i].name, - (long) old.rlim_max, (long) new.rlim_max); + fprintf(stderr, "%s: changing hard %s from %ld to %ld\n", + argv[0], types[i].name, + (long) old.rlim_max, (long) new.rlim_max); } if (setrlimit(types[i].value, &new) < 0) { fprintf(stderr, "%s: setrlimit(%s=%ld): %s\n", @@ -130,8 +130,8 @@ int main(int argc, char **argv) { } if (verbose) - printf("%s: user='%s', optind=%d, new argc=%d, argv[0]='%s'\n", - argv[0], user, optind, argc-optind, argv[optind]); + fprintf(stderr, "%s: user='%s', optind=%d, new argc=%d, argv[0]='%s'\n", + argv[0], user, optind, argc-optind, argv[optind]); execvp(argv[optind], argv+optind); fprintf(stderr, "%s: execvp('%s'): %s\n",