From fa57b2419e8cbab30f038e29db7af6cc501b8fc6 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 14 Jun 2005 21:38:56 +0000 Subject: [PATCH] srun --output or --error file names of "none" mapped to /dev/null for batch jobs rather than a file actually named "none". --- src/srun/opt.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/srun/opt.c b/src/srun/opt.c index bee7175f8df..7c9474ced09 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -846,7 +846,10 @@ static void _opt_args(int argc, char **argv) break; case (int)'e': xfree(opt.efname); - opt.efname = xstrdup(optarg); + if (strncasecmp(optarg, "none", (size_t) 4) == 0) + opt.efname = xstrdup("/dev/null"); + else + opt.efname = xstrdup(optarg); break; case (int)'g': if (_verify_geometry(optarg, opt.geometry)) @@ -904,7 +907,10 @@ static void _opt_args(int argc, char **argv) break; case (int)'o': xfree(opt.ofname); - opt.ofname = xstrdup(optarg); + if (strncasecmp(optarg, "none", (size_t) 4) == 0) + opt.ofname = xstrdup("/dev/null"); + else + opt.ofname = xstrdup(optarg); break; case (int)'O': opt.overcommit = true; -- GitLab