mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
58a34fbe09
If the exec promises fail to apply, then the normal promises should not apply either. Add a test for this fixed functionality.
26 lines
477 B
C++
26 lines
477 B
C++
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
int res = pledge("stdio unix rpath", "stdio");
|
|
if (res < 0) {
|
|
perror("pledge");
|
|
return 1;
|
|
}
|
|
|
|
res = pledge("stdio unix", "stdio unix");
|
|
if (res >= 0) {
|
|
fprintf(stderr, "second pledge should have failed\n");
|
|
return 1;
|
|
}
|
|
|
|
res = pledge("stdio rpath", "stdio");
|
|
if (res < 0) {
|
|
perror("pledge");
|
|
return 1;
|
|
}
|
|
|
|
return 0;
|
|
}
|