execl 和system的区别
2017-02-24 14:09
106 查看
在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的区别
- 4-ClassPathXmlApplicationContext 和FileSystemXmlApplicationContext的区别
- 当集合类仅仅存放不定数量字符类型的对象时,System.Collections.ArrayList和System.Collections.Specialized.StringCollection的区别?
- System.Windows.Forms.Timer和System.Timers.Timer的区别 [转]
- System.Windows.Forms.Timer和System.Timers.Timer的区别
- Oracle中sys和system两个用户的区别
- out.println()和System.out.println()区别转自我的新浪博客
- System.Windows.Forms.Timer和System.Timers.Timer的区别 [转]
- 浅谈Java的System.out.print与System.out.println的区别
- ClassPathXmlApplicationContext 和FileSystemXmlApplicationContext的区别
- Microsoft.VisualBasic.Len函数和System.String类中的length属性的区别
- Oracle中sys和system两个用户的区别
- sys和system的区别
- System.exit(-1)和return 的区别
- Microsoft.VisualBasic.Len函数和System.String类中的length属性的区别
- Class.forName()和ClassLoader.getSystemClassLoader().loadClass()区别
- Oracle中sys和system两个用户的区别
- Sys和system用户、sysdba 和sysoper系统权限、dba角色的区别(转载)
- ORACLE FORM system.trigger_item与system.cursor_item的区别