From fb97b4d691c04d9303571d7eba3cef4a97264e2f Mon Sep 17 00:00:00 2001 From: Doug Ledford Date: Thu, 24 Jul 2008 18:35:11 -0400 Subject: Clean up usage of open() Fix on call that passed an invalid mode to open Don't pass a third arg unless we also pass O_CREAT Use symbolic args for 2nd and 3rd args Signed-off-by: Doug Ledford --- Monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Monitor.c') diff --git a/Monitor.c b/Monitor.c index 54193f5c..abc2dbd6 100644 --- a/Monitor.c +++ b/Monitor.c @@ -156,7 +156,7 @@ int Monitor(mddev_dev_t devlist, return 1; } close(0); - open("/dev/null", 3); + open("/dev/null", O_RDWR); dup2(0,1); dup2(0,2); setsid(); -- cgit v1.2.3