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