Changeset 90100 in vbox
- Timestamp:
- Jul 8, 2021 2:37:49 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r90098 r90100 129 129 VKAT_TEST_OPT_PCM_CHAN, 130 130 VKAT_TEST_OPT_PCM_SIGNED, 131 VKAT_TEST_OPT_PIDFILE,132 131 VKAT_TEST_OPT_TAG, 133 132 VKAT_TEST_OPT_TEMPDIR, … … 178 177 { "--pcm-hz", VKAT_TEST_OPT_PCM_HZ, RTGETOPT_REQ_UINT16 }, 179 178 { "--pcm-signed", VKAT_TEST_OPT_PCM_SIGNED, RTGETOPT_REQ_BOOL }, 180 { "--pidfile", VKAT_TEST_OPT_PIDFILE, RTGETOPT_REQ_STRING },181 179 { "--mode", VKAT_TEST_OPT_MODE, RTGETOPT_REQ_STRING }, 182 180 { "--no-verify", VKAT_TEST_OPT_NO_VERIFY, RTGETOPT_REQ_NOTHING }, … … 648 646 case VKAT_TEST_OPT_PCM_CHAN: return "Specifies the number of PCM channels to use [2]"; 649 647 case VKAT_TEST_OPT_PCM_SIGNED: return "Specifies whether to use signed (true) or unsigned (false) samples [true]"; 650 case VKAT_TEST_OPT_PIDFILE: return "Specifies the PID file to use (for daemonizing)";651 648 case VKAT_TEST_OPT_TAG: return "Specifies the test set tag to use"; 652 649 case VKAT_TEST_OPT_TEMPDIR: return "Specifies the temporary directory to use"; … … 679 676 bool fPcmSigned = true; 680 677 681 const char *pszPidFile = NULL;682 678 bool fDaemonize = false; 683 679 bool fDaemonized = false; … … 789 785 break; 790 786 791 case VKAT_TEST_OPT_PIDFILE:792 pszPidFile = ValueUnion.psz;793 break;794 795 787 case VKAT_TEST_OPT_TAG: 796 788 pszTag = ValueUnion.psz; … … 824 816 { 825 817 if (g_uVerbosity > 0) 826 { 827 RTMsgInfo("Starting in background (as daemon) ..."); 828 if (pszPidFile) 829 RTMsgInfo("Using PID file '%s'", pszPidFile); 830 } 831 rc = RTProcDaemonizeUsingFork(true /* fNoChDir */, false /* fNoClose */, pszPidFile); 818 RTMsgInfo("Daemonizing..."); 819 rc = RTProcDaemonize(pGetState->argv, "--daemonized"); 832 820 if (RT_FAILURE(rc)) 833 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to daemonize: %Rrc\n", rc); 821 return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTProcDaemonize: %Rrc\n", rc); 822 return RTEXITCODE_SUCCESS; 834 823 } 835 824 else 836 825 { 837 826 if (g_uVerbosity > 0) 838 RTMsgInfo("Running in background (as daemon)...");827 RTMsgInfo("Running daemonized ..."); 839 828 } 840 829 }
Note:
See TracChangeset
for help on using the changeset viewer.