In sysvinit, do `telinit` and `init` run in the same process?
In https://manpages.debian.org/stretch/sysvinit-core/init.8.en.html
/sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action.
...
Init listens on a fifo in /run, /run/initctl, for messages. Telinit uses this to communicate with init.
Does the first sentence mean that telinit
is a symlink to init
? If yes, is it correct that telinit
and init
are run in the same process (e.g. maybe by some file lock) ? If yes, how can telinit
communicate with init
using FIFO or signals?
For comparison, in Systemd, systemd
and systemctl
are different program files. Does telinit
perform the same role to init
in sysvinit, as systemctl
to systemd
?
Thanks.
systemd init sysvinit
|
show 4 more comments
In https://manpages.debian.org/stretch/sysvinit-core/init.8.en.html
/sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action.
...
Init listens on a fifo in /run, /run/initctl, for messages. Telinit uses this to communicate with init.
Does the first sentence mean that telinit
is a symlink to init
? If yes, is it correct that telinit
and init
are run in the same process (e.g. maybe by some file lock) ? If yes, how can telinit
communicate with init
using FIFO or signals?
For comparison, in Systemd, systemd
and systemctl
are different program files. Does telinit
perform the same role to init
in sysvinit, as systemctl
to systemd
?
Thanks.
systemd init sysvinit
Uh...Why would you think of that? You can run two chrome process but they both usechrome.exe
.
– 炸鱼薯条德里克
Dec 19 '18 at 2:25
daemon is usually running as a singleton process (I don't know any that isn't), and an init process is a daemon.
– Tim
Dec 19 '18 at 2:32
Sorry, I don't quite understand "singleton process", did you mean executables that was designed to run only one process on the system? Daemons might be "singleton process"... or not. Back to your question, you have two process using the same/sbin/init
, with different logic, of course. I just feel you misunderstand so many basic OS concepts, based on the questions you've asked on this website, yes, I AM WATCHING YOU, because your questions interested me.
– 炸鱼薯条德里克
Dec 19 '18 at 2:37
Uh.. in the bad old time, some server might fork one process per TCP-connection, well, at least that's theoratically possible, right? Also, I wanna tell you, "daemons" are really not well-defined in Linux world, because linux, the kernel, don't care about this concept, only service manager cares about that, but might in different ways from human's mind.
– 炸鱼薯条德里克
Dec 19 '18 at 2:45
Does telinit perform the same role to init in sysvinit, as systemctl to systemd?
– Tim
Dec 19 '18 at 3:00
|
show 4 more comments
In https://manpages.debian.org/stretch/sysvinit-core/init.8.en.html
/sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action.
...
Init listens on a fifo in /run, /run/initctl, for messages. Telinit uses this to communicate with init.
Does the first sentence mean that telinit
is a symlink to init
? If yes, is it correct that telinit
and init
are run in the same process (e.g. maybe by some file lock) ? If yes, how can telinit
communicate with init
using FIFO or signals?
For comparison, in Systemd, systemd
and systemctl
are different program files. Does telinit
perform the same role to init
in sysvinit, as systemctl
to systemd
?
Thanks.
systemd init sysvinit
In https://manpages.debian.org/stretch/sysvinit-core/init.8.en.html
/sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action.
...
Init listens on a fifo in /run, /run/initctl, for messages. Telinit uses this to communicate with init.
Does the first sentence mean that telinit
is a symlink to init
? If yes, is it correct that telinit
and init
are run in the same process (e.g. maybe by some file lock) ? If yes, how can telinit
communicate with init
using FIFO or signals?
For comparison, in Systemd, systemd
and systemctl
are different program files. Does telinit
perform the same role to init
in sysvinit, as systemctl
to systemd
?
Thanks.
systemd init sysvinit
systemd init sysvinit
edited Dec 19 '18 at 2:17
asked Dec 19 '18 at 2:00
Tim
26k74246455
26k74246455
Uh...Why would you think of that? You can run two chrome process but they both usechrome.exe
.
– 炸鱼薯条德里克
Dec 19 '18 at 2:25
daemon is usually running as a singleton process (I don't know any that isn't), and an init process is a daemon.
– Tim
Dec 19 '18 at 2:32
Sorry, I don't quite understand "singleton process", did you mean executables that was designed to run only one process on the system? Daemons might be "singleton process"... or not. Back to your question, you have two process using the same/sbin/init
, with different logic, of course. I just feel you misunderstand so many basic OS concepts, based on the questions you've asked on this website, yes, I AM WATCHING YOU, because your questions interested me.
– 炸鱼薯条德里克
Dec 19 '18 at 2:37
Uh.. in the bad old time, some server might fork one process per TCP-connection, well, at least that's theoratically possible, right? Also, I wanna tell you, "daemons" are really not well-defined in Linux world, because linux, the kernel, don't care about this concept, only service manager cares about that, but might in different ways from human's mind.
– 炸鱼薯条德里克
Dec 19 '18 at 2:45
Does telinit perform the same role to init in sysvinit, as systemctl to systemd?
– Tim
Dec 19 '18 at 3:00
|
show 4 more comments
Uh...Why would you think of that? You can run two chrome process but they both usechrome.exe
.
– 炸鱼薯条德里克
Dec 19 '18 at 2:25
daemon is usually running as a singleton process (I don't know any that isn't), and an init process is a daemon.
– Tim
Dec 19 '18 at 2:32
Sorry, I don't quite understand "singleton process", did you mean executables that was designed to run only one process on the system? Daemons might be "singleton process"... or not. Back to your question, you have two process using the same/sbin/init
, with different logic, of course. I just feel you misunderstand so many basic OS concepts, based on the questions you've asked on this website, yes, I AM WATCHING YOU, because your questions interested me.
– 炸鱼薯条德里克
Dec 19 '18 at 2:37
Uh.. in the bad old time, some server might fork one process per TCP-connection, well, at least that's theoratically possible, right? Also, I wanna tell you, "daemons" are really not well-defined in Linux world, because linux, the kernel, don't care about this concept, only service manager cares about that, but might in different ways from human's mind.
– 炸鱼薯条德里克
Dec 19 '18 at 2:45
Does telinit perform the same role to init in sysvinit, as systemctl to systemd?
– Tim
Dec 19 '18 at 3:00
Uh...Why would you think of that? You can run two chrome process but they both use
chrome.exe
.– 炸鱼薯条德里克
Dec 19 '18 at 2:25
Uh...Why would you think of that? You can run two chrome process but they both use
chrome.exe
.– 炸鱼薯条德里克
Dec 19 '18 at 2:25
daemon is usually running as a singleton process (I don't know any that isn't), and an init process is a daemon.
– Tim
Dec 19 '18 at 2:32
daemon is usually running as a singleton process (I don't know any that isn't), and an init process is a daemon.
– Tim
Dec 19 '18 at 2:32
Sorry, I don't quite understand "singleton process", did you mean executables that was designed to run only one process on the system? Daemons might be "singleton process"... or not. Back to your question, you have two process using the same
/sbin/init
, with different logic, of course. I just feel you misunderstand so many basic OS concepts, based on the questions you've asked on this website, yes, I AM WATCHING YOU, because your questions interested me.– 炸鱼薯条德里克
Dec 19 '18 at 2:37
Sorry, I don't quite understand "singleton process", did you mean executables that was designed to run only one process on the system? Daemons might be "singleton process"... or not. Back to your question, you have two process using the same
/sbin/init
, with different logic, of course. I just feel you misunderstand so many basic OS concepts, based on the questions you've asked on this website, yes, I AM WATCHING YOU, because your questions interested me.– 炸鱼薯条德里克
Dec 19 '18 at 2:37
Uh.. in the bad old time, some server might fork one process per TCP-connection, well, at least that's theoratically possible, right? Also, I wanna tell you, "daemons" are really not well-defined in Linux world, because linux, the kernel, don't care about this concept, only service manager cares about that, but might in different ways from human's mind.
– 炸鱼薯条德里克
Dec 19 '18 at 2:45
Uh.. in the bad old time, some server might fork one process per TCP-connection, well, at least that's theoratically possible, right? Also, I wanna tell you, "daemons" are really not well-defined in Linux world, because linux, the kernel, don't care about this concept, only service manager cares about that, but might in different ways from human's mind.
– 炸鱼薯条德里克
Dec 19 '18 at 2:45
Does telinit perform the same role to init in sysvinit, as systemctl to systemd?
– Tim
Dec 19 '18 at 3:00
Does telinit perform the same role to init in sysvinit, as systemctl to systemd?
– Tim
Dec 19 '18 at 3:00
|
show 4 more comments
1 Answer
1
active
oldest
votes
It is a symlink, but programs can look at how they are called and perform different actions. This is extremely common in the Unix world.
And so when you run the telinit
comamnd, it runs in its own process space, separate from the init
process. It sends a messgae to the init
process. This may be sent via a FIFO, or by a signal, depending on compile time options.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489804%2fin-sysvinit-do-telinit-and-init-run-in-the-same-process%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is a symlink, but programs can look at how they are called and perform different actions. This is extremely common in the Unix world.
And so when you run the telinit
comamnd, it runs in its own process space, separate from the init
process. It sends a messgae to the init
process. This may be sent via a FIFO, or by a signal, depending on compile time options.
add a comment |
It is a symlink, but programs can look at how they are called and perform different actions. This is extremely common in the Unix world.
And so when you run the telinit
comamnd, it runs in its own process space, separate from the init
process. It sends a messgae to the init
process. This may be sent via a FIFO, or by a signal, depending on compile time options.
add a comment |
It is a symlink, but programs can look at how they are called and perform different actions. This is extremely common in the Unix world.
And so when you run the telinit
comamnd, it runs in its own process space, separate from the init
process. It sends a messgae to the init
process. This may be sent via a FIFO, or by a signal, depending on compile time options.
It is a symlink, but programs can look at how they are called and perform different actions. This is extremely common in the Unix world.
And so when you run the telinit
comamnd, it runs in its own process space, separate from the init
process. It sends a messgae to the init
process. This may be sent via a FIFO, or by a signal, depending on compile time options.
edited Dec 19 '18 at 3:22
answered Dec 19 '18 at 2:59
Stephen Harris
25k24477
25k24477
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489804%2fin-sysvinit-do-telinit-and-init-run-in-the-same-process%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Uh...Why would you think of that? You can run two chrome process but they both use
chrome.exe
.– 炸鱼薯条德里克
Dec 19 '18 at 2:25
daemon is usually running as a singleton process (I don't know any that isn't), and an init process is a daemon.
– Tim
Dec 19 '18 at 2:32
Sorry, I don't quite understand "singleton process", did you mean executables that was designed to run only one process on the system? Daemons might be "singleton process"... or not. Back to your question, you have two process using the same
/sbin/init
, with different logic, of course. I just feel you misunderstand so many basic OS concepts, based on the questions you've asked on this website, yes, I AM WATCHING YOU, because your questions interested me.– 炸鱼薯条德里克
Dec 19 '18 at 2:37
Uh.. in the bad old time, some server might fork one process per TCP-connection, well, at least that's theoratically possible, right? Also, I wanna tell you, "daemons" are really not well-defined in Linux world, because linux, the kernel, don't care about this concept, only service manager cares about that, but might in different ways from human's mind.
– 炸鱼薯条德里克
Dec 19 '18 at 2:45
Does telinit perform the same role to init in sysvinit, as systemctl to systemd?
– Tim
Dec 19 '18 at 3:00