Forum > Unix
equivalent setpgrp() in lazarus
marcov:
--- Quote from: MarkMLl on May 13, 2022, 07:08:40 pm ---And ASCII was introduced by IBM.
I don't care who introduced it: it's supported by Linux and that manpage cites POSIX.1 (with non-standard variations for SysV and BSD).
--- End quote ---
But not for that call afaik. For other calls on that manpage.
MarkMLl:
Hmmm. man setpgrp ->
--- Quote ---DESCRIPTION
All of these interfaces are available on Linux, and are used for getting and setting the process group ID (PGID) of a process. The
preferred, POSIX.1-specified ways of doing this are: getpgrp(void), for retrieving the calling process's PGID; and setpgid(), for
setting a process's PGID.
--- End quote ---
and
--- Quote ---The System V-style setpgrp(), which takes no arguments, is equivalent to setpgid(0, 0).
The BSD-specific setpgrp() call, which takes arguments pid and pgid, is a wrapper function that calls
setpgid(pid, pgid)
Since glibc 2.19, the BSD-specific setpgrp() function is no longer exposed by <unistd.h>; calls should be replaced with the
setpgid() call shown above.
--- End quote ---
Also in ./rtl/linux/x86_64/sysnr.inc:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- syscall_nr_setpgid = 109; syscall_nr_getppid = 110; syscall_nr_getpgrp = 111;... syscall_nr_getpgid = 121;
It looks as though the Netware RTL is the only one to implement FpSetpgid(), which might in practice be what OP's looking for.
MarkMLl
marcov:
From my debian manpage:
--- Quote --- POSIX.1-2001 also specifies getpgid() and the version of setpgrp() that takes no arguments. (POSIX.1-2008 marks this setpgrp()
specification as obsolete.)
The version of getpgrp() with one argument and the version of setpgrp() that takes two arguments derive from 4.2BSD, and are not
specified by POSIX.1.
--- End quote ---
So no parameter version of setpgrp was shortly specified and then obsoleted, and the 2 argument version (which this thread is about) never was standarized
MarkMLl:
--- Quote from: marcov on May 13, 2022, 11:12:47 pm ---So no parameter version of setpgrp was shortly specified and then obsoleted, and the 2 argument version (which this thread is about) never was standarized
--- End quote ---
I don't think OP specifies the number of parameters. In any event, there appear to be Linux syscalls that can't be easily accessed other than by going via the termios stuff (which, TBH, is probably functionally adequate).
MarkMLl
Thaddy:
--- Quote from: MarkMLl on May 13, 2022, 11:00:32 pm ---It looks as though the Netware RTL is the only one to implement FpSetpgid(), which might in practice be what OP's looking for.
MarkMLl
--- End quote ---
Yes. Correct. Grep will tell you so too... (I am repeating myself).
Now playing The Hyves again. https://www.youtube.com/watch?v=Uz1Jwyxd4tE Useful song..
Navigation
[0] Message Index
[#] Next page
[*] Previous page