8000 Create new process group for pgcopydb initialization. by shubhamdhama · Pull Request #211 · dimitri/pgcopydb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Create new process group for pgcopydb initialization. #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/bin/pgcopydb/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ static void log_semaphore_unlink_atexit(void);
int
main(int argc, char **argv)
{
/*
* Create a new process group and set current process as its leader. This
* allows the process group to be easily controlled, without affecting any
* wrapper processes around the pgcopydb command. No errors are defined for
* setpgrp and it has no effect when the calling process is a session
* leader.
*/
setpgrp();

CommandLine command = root;

/* allows changing process title in ps/top/ptree etc */
Expand Down
0