作者florenceL (佛羅倫斯)
看板Linux
標題Fw: [問題] exit沒有執行?
時間Sat Oct 31 16:25:45 2015
※ [本文轉錄自 Programming 看板 #1MD6VSJH ]
作者: florenceL (佛羅倫斯) 看板: Programming
標題: [問題] exit沒有執行?
時間: Sat Oct 31 15:03:52 2015
各位版友好
想請問一下
我在server程式中fork出一個child執行execlp("/bin/exit","exit");
但是跑起來server沒有被關掉
但是我自己在server的shell手打上exit卻會關掉server端,
想請問是甚麼原因?
以及 execlp是哪裡寫錯了?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.115.53.27
※ 文章網址: https://webptt.com/m.aspx?n=bbs/Programming/M.1446275036.A.4D1.html
※ 發信站: 批踢踢實業坊(ptt.cc)
※ 轉錄者: florenceL (140.115.53.27), 10/31/2015 16:25:45
1F:→ lantw44: 並沒有 /bin/exit 這個檔案,exit 是 shell 內建的指令 10/31 17:21
2F:噓 Vdragon: 這可以轉笨板了 11/01 12:41
3F:→ Vdragon: 有一個子程式叫做 exit 很好用的 11/01 12:43
4F:→ bitlife: 原po是想要shutdown還是exit shell? 如果是後者,本來無一 11/01 13:18
5F:→ bitlife: 物,何必去關它? 11/01 13:18