#63 setpgid03 fail

System Calls
closed-postponed
Testcases (113)
5
2007-05-11
2005-02-01
No

setpgid03 test result:
--------------------
setpgid03 1 PASS : setpgid SUCCESS to set errno
to EPERM
setpgid03 2 FAIL : setpgid FAILED, expect EACCES
got 1

This failure occurred only once, but it usually passed.
IMNO there is a hole in synchronization between child
and parent processes.

//test2
if (pid == 0) {
execlp(...);
...
} else {
sleep(1);
rval = setpgid(pid, getppid());
...
}

setpgid() is executed before execlp().
I suggest the setpgid03-test2.patch to correct this
failure.

I see a simular potential (!!!) problem for setpgid03 test1.

//test1
if (pid == 0) {
setsid(...);
...
} else {
sleep(1);
rval = setpgid(pid, getppid());
...
}

Just in case, I attach setpgid03.patch.
It can be used to correct both inaccuracies.

Discussion

  • Robert Williamson

    • assigned_to: nobody --> mridge
     
  • Tatiana Gavrilova

    Logged In: YES
    user_id=1208761

    Would you like to review setpgid03-test2.patch?
    Tell me, please, do you agree with my previous comments
    and setpgid03-test2.patch?
    If you agree it would greatly appreciate if you apply it.
    Thanks,
    Tatiana.

     
  • Subrata Modak

    Subrata Modak - 2007-05-11
    • status: open --> closed-postponed
     
  • Subrata Modak

    Subrata Modak - 2007-05-11

    Logged In: YES
    user_id=1737361
    Originator: NO

    Please submit against the latest release of LTP (20070430), if you think your point is still valid.
    Regards--
    Subrata

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks