execl 和system的区别
2018-02-07 10:16
218 查看
在c中又时候需要执行一个shell或者bin 时候 就需要用到system 或者execl 函数系类。 那么我们怎样来选这个函数能?
execl 这个函数系列 他会代替调用它的程序 执行完成后 不会回到主调程序中 直接用新的execl create的shell替代了 原来的程序。
system 这个函数不同 他会fork一个子程序中 但他会在主调程序中等待 system的返回。 相当于 for+execl+waitpid 三个函数的合体。
execl 这个函数系列 他会代替调用它的程序 执行完成后 不会回到主调程序中 直接用新的execl create的shell替代了 原来的程序。
system 这个函数不同 他会fork一个子程序中 但他会在主调程序中等待 system的返回。 相当于 for+execl+waitpid 三个函数的合体。
相关文章推荐
- execl系列函数特点,以及与system的区别
- execl 和system的区别
- GetCurrentTime(),GetLocalTime(),GetSystemTime()之间的区别
- java中的system.out.println()和JSP中out.println()区别
- finish、onDestory、System.exit的区别
- Android Activity类中的finish()、onDestory()和System.exit(0) 三者的区别
- system execl
- GetSystemTime和GetLocalTime的区别
- Oracle sys和system用户、sysdba 和sysoper系统权限、sysdba和dba角色的区别
- spring中ClassPathXmlApplication和FileSystemXmlApplicationContext使用区别
- Android开发—Activity中的finish()、OnDestroy()和System.exit()的区别
- Activity的finish()和System.exit(0)的区别
- System.exit(0)和System.exit(1)区别
- System.nanoTime与System.currentTimeMillis的区别
- 由 System.arraycopy 引发的巩固:对象引用 与 对象 的区别
- system.out.println与system.err.println的区别
- java中的system.out.println()和JSP中out.println()区别
- String str;System.out.println(str);与String str = new String();System.out.println(str);区别
- 调研popen/system, 理解这两个函数和fork的区别.
- system,popen函数与fork的区别