Skip to content

Commit

Permalink
Showing 4 changed files with 16 additions and 1 deletion.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/process/setpgrp_tags.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
fails:Process.setpgrp and Process.getpgrp sets and gets the process group ID of the calling process
fails:Process.setpgrp and Process.getpgrp Process.setpgrp returns zero
Original file line number Diff line number Diff line change
@@ -423,6 +423,16 @@ public int setgid(int gid) {

}

@CoreMethod(names = "setpgid", isModuleFunction = true, required = 2, lowerFixnum = {1, 2}, unsafe = UnsafeGroup.PROCESSES)
public abstract static class SetpgidNode extends CoreMethodArrayArgumentsNode {

@Specialization
public int setpgid(int pid, int pgid) {
return posix().setpgid(pid, pgid);
}

}

@CoreMethod(names = "setpriority", isModuleFunction = true, required = 3, lowerFixnum = { 1, 2, 3 }, unsafe = UnsafeGroup.PROCESSES)
public abstract static class SetPriorityNode extends CoreMethodArrayArgumentsNode {

Original file line number Diff line number Diff line change
@@ -122,6 +122,11 @@ public int getpgid(int pid) {
return posix.getpgid(pid);
}

@Override
public int setpgid(int pid, int pgid) {
return posix.setpgid(pid, pgid);
}

@Override
public int getpgrp() {
return posix.getpgrp();
Original file line number Diff line number Diff line change
@@ -42,6 +42,7 @@ public interface TrufflePosix {
int seteuid(int euid);
int getgid();
int getpgid(int pid);
int setpgid(int pid, int pgid);
int getpgrp();
int getpid();
int getppid();

0 comments on commit f08b629

Please sign in to comment.