-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
if(pid = fork())
exit(0);
else if(pid < 0)
exit(1);
pid=fork()
当返回值是-1时条件也是成立的,虽然能正常工作。但不够严
谨。
建议这样处理:
if((pid = fork()) >0)
exit(0);
else if(pid < 0)
exit(1);
Original issue reported on code.google.com by [email protected] on 27 May 2013 at 1:29