Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

C客户端守护进程初始化有问题 #31

Open
@GoogleCodeExporter

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 lanwent...@gmail.com on 27 May 2013 at 1:29

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /