请问C里面有没有跟system函数差不多的函数

来源:百度知道 编辑:UC知道 时间:2024/05/12 10:35:42
但是能够返回system调用的程序的返回值
例如abc.exe的返回值是3
我想定义一个变量通过调用abc.exe来将它赋值为3
那为什么我运行了int a=system(abc.exe);后a结果等-1
啊 (abc.exe是顺利执行完毕的)

system 本身就可以返回调用的程序的返回值啊

RETURN VALUE
The value returned is -1 on error (e.g. fork() failed), and the return status of the command otherwise. This latter return status
is in the format specified in wait(2). Thus, the exit code of the command will be WEXITSTATUS(status). In case /bin/sh could not
be executed, the exit status will be that of a command that does exit(127).

If the value of command is NULL, system() returns non-zero if the shell is available, and zero if not.

system() does not affect the wait status of any other children.

请问C里面有没有跟system函数差不多的函数 请问有谁知到c:/windows/system32/cofig里面的SYSTEM是一个什么文件? 请问C语言里面有没有变体型的数据类型 请问C:\System Volume Information,这个文件是什么。占用了我110多G的资源,里面1个文件也没有!求救!! 请问C;\system volume inform.....里面的文件可以删除掉吗? 请问 C:\System Volume Information\这个位置里是放些什么程序的?里面的东西要是被删了的话会有什么问题吗 请问有没有一首诗,里面含了“池”跟“田”这两个字的?? NTFS file system跟FAT file system有什么不同? 我的C盘里面有个C:\System Volume Information占很大空间,看不到删除不了! 请问C:\WINDOWS\system\Slsvce.exe这病毒有没有彻底解决的办法啊?删除后过一段时间又跑出来烦人。