proctl man page on Xenix

Man page or keyword search:  
man Server   1130 pages
apropos Keyword Search (all sections)
Output format
Xenix logo
[printable version]



     PROCTL(S)		      XENIX System V		     PROCTL(S)

     Name
	  proctl - Controls active processes or process groups.

     Syntax
	  #include <sys/proctl.h>

	  proctl(pid, command, arg)
	  int pid, command;
	  char *arg;

     Description
	  proctl performs a variety of functions on active processes
	  or process groups.  It has the same form as the ioctl(S)
	  system call, except that a process ID (pid) is substituted
	  for a file descriptor as the first parameter.

	  command is an integer mnemonic, specifying the action to be
	  taken, and arg is a pointer to a data structure which
	  defines the parameters associated with the command if
	  necessary.

	  If pid is greater than zero (0), the command affects the
	  process whose process ID is equal to pid.  pid may be 1.

	  If pid is zero, the command is sent to all processes, except
	  processes 0 and 1 whose process group ID is equal to the
	  process group ID of the sender.

	  If pid is -1 and the effective user ID of the sender is not
	  the super-user, the command is sent to all processes, except
	  processes 0 and 1 whose real user ID is equal to the
	  effective user ID of the sender.

	  If pid is -1 and the effective user ID of the sender is
	  super-user, the command is sent to all processes except
	  processes 0 and 1.

	  If pid is negative but not -1, a signal is sent to all
	  processes whose process group ID is equal to the absolute
	  value of pid.

	  proctl will fail if one or more of the following are true:

	       command or arg is not valid.  [EINVAL]

	       No process can be found to match the specified pid.
	       [ESRCH]

	       The user ID of the sending process is not super-user,
	       and its real or effective user ID does not match the
	       real or effective user ID of the receiving process.
	       [EPERM]

     Page 1					      (printed 8/7/87)

     PROCTL(S)		      XENIX System V		     PROCTL(S)

	       The program has requested more memory than is
	       available.  [ENOMEM]

	       arg is not a valid address.  [EFAULT]

     Memory Restrictions
	  exec(S) may fail when the required physical memory is larger
	  than the available swap space. This restriction may be
	  lifted using one of the following proctl commands:

	  PRHUGEX

	       Allows programs to be executed by this process even if
	       they exceed the available swap space. Such programs
	       must still fit in the available physical memory and the
	       caller's effective user ID must be super-user.  Such
	       HUGE processes are locked in memory to prevent them
	       from being swapped.  Processes that are marked HUGE
	       with this system call but are not greater than the size
	       of the swapper behave normally but can expand into a
	       HUGE, locked process.

	  PRNORMX

	       Makes a process unable to exec(S) HUGE programs.	 This
	       call may be executed by any user. If an attempt is made
	       to classify a process as normal using the PRNORMX call
	       when the process is already too big to swap, the proctl
	       call will fail, returning EINVAL.

	  For example, you can use the following code to allow a
	  process to be executed even if it exceeds the available
	  memory swapping space:

	  if (argc < 2) {
	       fputs ("usage: runbig command arg ...\n", stderr);
	       exit(2);
	  }
	  argv[argc] = 0;

	  if (proctl(getpid(), PRHUGEX, (char *) 0) < 0) {
	       perror ("runbig");
	       exit(1);
	  }

     Return Value
	  If an error has occurred, a value of -1 is returned and
	  errno is set to indicate the error.

     See Also
	  exec(S), ioctl(S), kill(S)

     Page 2					      (printed 8/7/87)

     PROCTL(S)		      XENIX System V		     PROCTL(S)

     Notes
	  This function must be linked with the linker option -lx.

     Page 3					      (printed 8/7/87)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net