簡體   English   中英

launchd ExitTimeOut不起作用

[英]launchd ExitTimeOut doesn't work

我有一份有關工作的plist文件:

<dict>
    <key>Label</key>
    <string>StartScript</string>
    <key>Program</key>
        <string>/Users/ie54553/Desktop/script.sh</string>

    <key>StartInterval</key>
        <integer>10</integer>

    <key>ExitTimeOut</key>
        <integer>30</integer>

    <key>StandardOutPath</key>
        <string>/tmp/Out.log</string>
    <key>StandardErrorPath</key>
        <string>/tmp/Err.log</string>
</dict>

問題是script.sh每隔10秒反復執行一次,並且在ExitTimeOut時間(30秒)后不會停止執行

由於某種原因,ExitTimeOut不起作用......

知道如何殺死工作/執行嗎?

坦克

這不是ExitTimeOut的用途。 卸載作業時, launchd將信號SIGTERM發送給進程。 如果作業不在ExitTimeOut秒內終止(默認為20秒),則launchd將發送SIGKILL信號強制退出。

在給定的超時后, launchd無法終止作業。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM