Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6110893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:34:04+00:00 2026-05-23T14:34:04+00:00

Unix processes have a session id and are part of a process group –

  • 0

Unix processes have a session id and are part of a process group – which can be changed/queried with functions such as setsid()/getpgrp().

However the concept of a process group and session always eluded me, could anybody explain what significance having distinct sessions and process groups provide – why/when do one want to create a new session or place several processes in the same session and/or process group ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:34:05+00:00Added an answer on May 23, 2026 at 2:34 pm

    A process group is a collection of related processes which can all be signalled at once.

    A session is a collection of process groups, which are either attached to a single terminal device (known as the controlling terminal) or not attached to any terminal.

    Sessions are used for job control: one of the process groups in the session is the foreground process group, and can be sent signals by terminal control characters. You can think of a session with a controlling terminal as corresponding to a “login” on that terminal. (Daemons normally disassociate themselves from any controlling terminal by creating a new session without one.)

    e.g. if you run some_app from the shell, the shell creates a new process group for it, and makes that the foreground process group of the session. (some_app might create some child processes; by default they will be part of the same process group.) If you then press ^Z, some_app‘s process group is signalled to stop it; and the shell’s process group is switched to be the foreground process group again. Then e.g.bg %1 would start some_app‘s process group again, but keep it running in the background.


    The POSIX.1-2008 standard is fairly readable (at least, I think so!) – take a look at the definitions and the relevant sections of the “General Terminal Interface” chapter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I nohuped a parent process in unix, will the spawned child processes have
I basically have a unix process running and it is doing some heavy processing
On Unix, everything is a file, so you can use file i/o functions with
I have to use a tool (namely, Rez) which processes text but does not
What I read today about UNIX's pipes: If multiple processes are writing to a
I need to start a Unix process by calling a PHP-page through the web.
I'm writing a mini-shell to get more familiar with Unix process management in C.
In Unix, when a child process in background terminates, it sends a SIGCHLD signal
I'm writing a PHP process that will run on a Unix machine that will
Is there a standard linux/unix pattern for communicating with long running process? For example,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.