use a consistent style to handle fork()
Needs ReviewPublic

Authored by dakon on May 23 2018, 8:35 PM.

Details

Reviewers
aacid

Diff Detail

Repository
R107 KWallet PAM Integration
Lint
Lint Skipped
Unit
Unit Tests Skipped
dakon created this revision.May 23 2018, 8:35 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 23 2018, 8:35 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
dakon requested review of this revision.May 23 2018, 8:35 PM
aacid added inline comments.May 23 2018, 10:00 PM
pam_kwallet.c
441

This construct makes the code harder to read imho, previously it was clear that the parent (i.e. pid != 0) was being exited and the child (outside the if) left to live, now you have to realize that case 0 has a break and that there's code below that will be executed.

If you really feel that strong about having all the forks be switch, i'd like a comment here saying something like "child execution continues outside the switch", i know it's obvious but it took me a while to realize, and i've been reading this code a lot lately.