Is telinit run as a daemon?
In sysvinit, telinit
is a symlink to init
.
init
is run as a daemon. Is telinit
run as a daemon?
I don't have sysvinit installed on my Lubuntu. For comparison, systemctl
plays similar role to systemd
as telinit
to init
, and systemctl
has a controlling terminal so is not running as a daemon, while systemd
is run as a daemon.
Thanks.
systemd daemon init sysvinit
add a comment |
In sysvinit, telinit
is a symlink to init
.
init
is run as a daemon. Is telinit
run as a daemon?
I don't have sysvinit installed on my Lubuntu. For comparison, systemctl
plays similar role to systemd
as telinit
to init
, and systemctl
has a controlling terminal so is not running as a daemon, while systemd
is run as a daemon.
Thanks.
systemd daemon init sysvinit
add a comment |
In sysvinit, telinit
is a symlink to init
.
init
is run as a daemon. Is telinit
run as a daemon?
I don't have sysvinit installed on my Lubuntu. For comparison, systemctl
plays similar role to systemd
as telinit
to init
, and systemctl
has a controlling terminal so is not running as a daemon, while systemd
is run as a daemon.
Thanks.
systemd daemon init sysvinit
In sysvinit, telinit
is a symlink to init
.
init
is run as a daemon. Is telinit
run as a daemon?
I don't have sysvinit installed on my Lubuntu. For comparison, systemctl
plays similar role to systemd
as telinit
to init
, and systemctl
has a controlling terminal so is not running as a daemon, while systemd
is run as a daemon.
Thanks.
systemd daemon init sysvinit
systemd daemon init sysvinit
asked Dec 19 '18 at 12:27
Tim
26k74246455
26k74246455
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Whether a file is a symlink to another one has no bearing on how it runs. telinit
, like systemctl
, runs as a “normal” process.
add a comment |
Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.
When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.
For example, here's a simple shell script
$ cat x
#!/bin/bash
pname=${0##*/}
case $pname in
tina) echo "Tina Tuner doesn't need another hero" ;;
fred) echo "The current date is: $(date)" ;;
harry) sleep 3 ;;
*) echo Call me tina or fred or harry
esac
It has symlinks:
$ ls -l x tina fred harry
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
-rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*
So now I can get different results, depending on how I call it:
$ ./tina
Tina Tuner doesn't need another hero
$ ./fred
The current date is: Wed Dec 19 09:50:00 EST 2018
$ ./harry
$ ./x
Call me tina or fred or harry
$ ln -s x something
$ ./something
Call me tina or fred or harry
Now the sysv-init
program does something similar. If started as telinit
then it simply signals the main init
program. If started as init
(and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.
So, no; telinit
is not a daemon.
add a comment |
init is run as a daemon. Is telinit run as a daemon?
No, init binary has a different behaviour when invoked as telinit.
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%2f489896%2fis-telinit-run-as-a-daemon%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Whether a file is a symlink to another one has no bearing on how it runs. telinit
, like systemctl
, runs as a “normal” process.
add a comment |
Whether a file is a symlink to another one has no bearing on how it runs. telinit
, like systemctl
, runs as a “normal” process.
add a comment |
Whether a file is a symlink to another one has no bearing on how it runs. telinit
, like systemctl
, runs as a “normal” process.
Whether a file is a symlink to another one has no bearing on how it runs. telinit
, like systemctl
, runs as a “normal” process.
answered Dec 19 '18 at 12:49
Stephen Kitt
164k24365444
164k24365444
add a comment |
add a comment |
Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.
When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.
For example, here's a simple shell script
$ cat x
#!/bin/bash
pname=${0##*/}
case $pname in
tina) echo "Tina Tuner doesn't need another hero" ;;
fred) echo "The current date is: $(date)" ;;
harry) sleep 3 ;;
*) echo Call me tina or fred or harry
esac
It has symlinks:
$ ls -l x tina fred harry
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
-rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*
So now I can get different results, depending on how I call it:
$ ./tina
Tina Tuner doesn't need another hero
$ ./fred
The current date is: Wed Dec 19 09:50:00 EST 2018
$ ./harry
$ ./x
Call me tina or fred or harry
$ ln -s x something
$ ./something
Call me tina or fred or harry
Now the sysv-init
program does something similar. If started as telinit
then it simply signals the main init
program. If started as init
(and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.
So, no; telinit
is not a daemon.
add a comment |
Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.
When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.
For example, here's a simple shell script
$ cat x
#!/bin/bash
pname=${0##*/}
case $pname in
tina) echo "Tina Tuner doesn't need another hero" ;;
fred) echo "The current date is: $(date)" ;;
harry) sleep 3 ;;
*) echo Call me tina or fred or harry
esac
It has symlinks:
$ ls -l x tina fred harry
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
-rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*
So now I can get different results, depending on how I call it:
$ ./tina
Tina Tuner doesn't need another hero
$ ./fred
The current date is: Wed Dec 19 09:50:00 EST 2018
$ ./harry
$ ./x
Call me tina or fred or harry
$ ln -s x something
$ ./something
Call me tina or fred or harry
Now the sysv-init
program does something similar. If started as telinit
then it simply signals the main init
program. If started as init
(and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.
So, no; telinit
is not a daemon.
add a comment |
Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.
When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.
For example, here's a simple shell script
$ cat x
#!/bin/bash
pname=${0##*/}
case $pname in
tina) echo "Tina Tuner doesn't need another hero" ;;
fred) echo "The current date is: $(date)" ;;
harry) sleep 3 ;;
*) echo Call me tina or fred or harry
esac
It has symlinks:
$ ls -l x tina fred harry
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
-rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*
So now I can get different results, depending on how I call it:
$ ./tina
Tina Tuner doesn't need another hero
$ ./fred
The current date is: Wed Dec 19 09:50:00 EST 2018
$ ./harry
$ ./x
Call me tina or fred or harry
$ ln -s x something
$ ./something
Call me tina or fred or harry
Now the sysv-init
program does something similar. If started as telinit
then it simply signals the main init
program. If started as init
(and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.
So, no; telinit
is not a daemon.
Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.
When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.
For example, here's a simple shell script
$ cat x
#!/bin/bash
pname=${0##*/}
case $pname in
tina) echo "Tina Tuner doesn't need another hero" ;;
fred) echo "The current date is: $(date)" ;;
harry) sleep 3 ;;
*) echo Call me tina or fred or harry
esac
It has symlinks:
$ ls -l x tina fred harry
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
-rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*
So now I can get different results, depending on how I call it:
$ ./tina
Tina Tuner doesn't need another hero
$ ./fred
The current date is: Wed Dec 19 09:50:00 EST 2018
$ ./harry
$ ./x
Call me tina or fred or harry
$ ln -s x something
$ ./something
Call me tina or fred or harry
Now the sysv-init
program does something similar. If started as telinit
then it simply signals the main init
program. If started as init
(and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.
So, no; telinit
is not a daemon.
answered Dec 19 '18 at 14:54
Stephen Harris
25.1k24477
25.1k24477
add a comment |
add a comment |
init is run as a daemon. Is telinit run as a daemon?
No, init binary has a different behaviour when invoked as telinit.
add a comment |
init is run as a daemon. Is telinit run as a daemon?
No, init binary has a different behaviour when invoked as telinit.
add a comment |
init is run as a daemon. Is telinit run as a daemon?
No, init binary has a different behaviour when invoked as telinit.
init is run as a daemon. Is telinit run as a daemon?
No, init binary has a different behaviour when invoked as telinit.
answered Dec 21 '18 at 2:41
Cristian Rodríguez
32612
32612
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%2f489896%2fis-telinit-run-as-a-daemon%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