[問題] execvp問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Linux
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
unistd.h
問題(Question):
一個簡單的shell,讀入使用者指令,切割,並使用execvp執行命令
懷疑是strtok那邊出錯,但不知道原因
餵入的資料(Input):
ls
預期的正確結果(Expected Output):
list結果
錯誤結果(Wrong Output):
沒任何東西出來= =
程式碼(Code):(請善用置底文網頁, 記得排版)
child process部分程式碼
http://codepad.org/JaekcSyD
補充說明(Supplement):
卡好久了= = 有請高手
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.136.218
※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1413382758.A.49A.html
→
10/15 22:52, , 1F
10/15 22:52, 1F
→
10/15 22:59, , 2F
10/15 22:59, 2F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章