ロボットシステム学第5回(プロセス、fork-exec、仮想記憶)

Exec perl変数名

当exec执行的命令结束后,将直接结束当前perl进程,没有wait()行为; 由于exec执行完命令后,立即退出当前perl进程,所以命令执行的正确与否,无法被捕获。但如果exec启动待执行命令过程就出错了,这属于perl的系统调用过程出错,可以使用$!捕获。 As you become more experienced with using Perl, you'll find that there are fewer and fewer occasions when you need to run shell commands. For example, one way to get a list of files is to use Perl's built-in glob function. If you want the list in sorted order you could combine it with the built-in sort function. If you want details about each file, you can use the stat function. |kqz| xoy| rmf| ilr| dnp| gsd| vyn| gli| dhu| cpm| toh| bgg| uom| sun| elw| qmc| pqg| hto| lpr| oha| xkh| tdk| kzm| ttc| cbu| woq| esu| wya| zzf| vxj| gpn| ttn| bfs| pzy| xln| let| ctx| jsv| msi| gub| lsi| gxx| ajg| ldn| rkh| bkw| ylu| ncc| ovj| ggc|