lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master bf80fc8 11/14: Use env instead of set for the


From: Greg Chicares
Subject: [lmi-commits] [lmi] master bf80fc8 11/14: Use env instead of set for the native Linux build
Date: Sat, 10 Oct 2020 11:07:13 -0400 (EDT)

branch: master
commit bf80fc8564bdf78aa8226959b87402f1f1080c04
Author: Ilya Sinitsyn <isinitsyn@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Use env instead of set for the native Linux build
---
 main_cgi.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/main_cgi.cpp b/main_cgi.cpp
index dace41d..fe3f52a 100644
--- a/main_cgi.cpp
+++ b/main_cgi.cpp
@@ -99,7 +99,11 @@ int try_main(int argc, char* argv[])
 
     if(argc == 2 && argv[1] == std::string("--capture"))
         {
+#       if defined LMI_POSIX
+        int exit_code = std::system("env > settings");
+#       else
         int exit_code = std::system("set > settings");
+#       endif // defined LMI_POSIX
         if(EXIT_SUCCESS != exit_code)
             {
             std::cerr << "Failed to execute 'set' command;";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]