about summary refs log tree commit diff
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-03-22T03·25-0400
committerShea Levy <shea@shealevy.com>2018-03-22T03·25-0400
commitc24e0439b21680771f4684f31e49fe7896190824 (patch)
treea878cd5bb095a96d16209754d5ce90357c7f2f18
parentec91840e70a7dbe59669e08f83ddad149bfba906 (diff)
parentf66ae2228880ba757af7dfcd216408ff95abaeba (diff)
Merge branch 'fix/execl-null-sentinel' of git://github.com/dtzWill/nix
-rw-r--r--src/libmain/shared.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 7d888202bbf1..91a4eaf922a6 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -263,7 +263,7 @@ void showManPage(const string & name)
 {
     restoreSignals();
     setenv("MANPATH", settings.nixManDir.c_str(), 1);
-    execlp("man", "man", name.c_str(), NULL);
+    execlp("man", "man", name.c_str(), nullptr);
     throw SysError(format("command 'man %1%' failed") % name.c_str());
 }
 
@@ -325,10 +325,10 @@ RunPager::RunPager()
             setenv("LESS", "FRSXMK", 1);
         restoreSignals();
         if (pager)
-            execl("/bin/sh", "sh", "-c", pager, NULL);
-        execlp("pager", "pager", NULL);
-        execlp("less", "less", NULL);
-        execlp("more", "more", NULL);
+            execl("/bin/sh", "sh", "-c", pager, nullptr);
+        execlp("pager", "pager", nullptr);
+        execlp("less", "less", nullptr);
+        execlp("more", "more", nullptr);
         throw SysError(format("executing '%1%'") % pager);
     });