Cat blocking when piping output from /usr/bin/gssproxy (`timeout -k 1 1 /usr/bin/gssproxy | cat` does not terminate) The 2019 Stack Overflow Developer Survey Results Are InPiping output from a segfaulting programssh “-f” don't give back hand in bash when listening to stdout/stderrTimeout doesn't occur when reading from fifo using `read`Formatting grep output with awk. Simple case and background caseWhen does cat finish reading from a pipe?Piping sed/grep output does not workWhy doesn't file redirection to and from a named pipe work, but piping to cat does?Opening named pipe blocks forever, if pipe is deleted without being connectedCapturing all output from piping input into a cli programSetting variable output from timeout

Multi tool use
Multi tool use

Spanish for "widget"

Why isn't airport relocation done gradually?

How long do I have to send payment?

Should I use my personal or workplace e-mail when registering to external websites for work purpose?

How come people say “Would of”?

How to create dashed lines/arrows in Illustrator

Why do UK politicians seemingly ignore opinion polls on Brexit?

Patience, young "Padovan"

Does a dangling wire really electrocute me if I'm standing in water?

How to manage monthly salary

Dual Citizen. Exited the US on Italian passport recently

Is domain driven design an anti-SQL pattern?

Inversion Puzzle

Pristine Bit Checking

"To split hairs" vs "To be pedantic"

A poker game description that does not feel gimmicky

Does it makes sense to buy a new cycle to learn riding?

"Riffle" two strings

Where to refill my bottle in India?

Monty Hall variation

"What time...?" or "At what time...?" - what is more grammatically correct?

Time travel alters history but people keep saying nothing's changed

What can other administrators access on my machine?

What tool would a Roman-age civilization have to grind silver and other metals into dust?



Cat blocking when piping output from /usr/bin/gssproxy (`timeout -k 1 1 /usr/bin/gssproxy | cat` does not terminate)



The 2019 Stack Overflow Developer Survey Results Are InPiping output from a segfaulting programssh “-f” don't give back hand in bash when listening to stdout/stderrTimeout doesn't occur when reading from fifo using `read`Formatting grep output with awk. Simple case and background caseWhen does cat finish reading from a pipe?Piping sed/grep output does not workWhy doesn't file redirection to and from a named pipe work, but piping to cat does?Opening named pipe blocks forever, if pipe is deleted without being connectedCapturing all output from piping input into a cli programSetting variable output from timeout



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I use gssproxy under Arch Linux, in particular



Name : gssproxy
Version : 0.8.0-1


I encountered the following behavior: When trying to pipe the output of
/usr/bin/gssproxy
like so



/usr/bin/gssproxy | cat



it blocks.
However, when I just run this command:
/usr/bin/gssproxy it does not block, but creates another process in the background



root 13720 0.0 0.0 59732 584 ? Ssl 11:44 0:00 /usr/bin/gssproxy



and exists.



I acknowledge that there is probably no point in piping the output of gssproxy, but nevertheless I am still wondering why this behavior occurs? In particular, what causes cat to block?



EDIT:



By blocking, I mean that the following command:



timeout -k 1 1 /usr/bin/gssproxy | cat,



does not terminate, while



timeout -k 1 1 /usr/bin/gssproxy



terminates immediately. Both command spawn gssproxy process in the background. I am wondering why the first command
does not terminate after 1 second as I would expect?










share|improve this question









New contributor




MLStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1





    How do you see that it's blocked? gssproxy is a daemon program. I would not be surprised if it simple tests to see whether it's standard output is connected to a terminal or not, and if it's not it may simply decide to not output anything (because it thinks it's running as it should be running, in the background). If it's connected to a terminal, it obviously re-executes itself in the background.

    – Kusalananda
    Apr 6 at 12:33












  • It might be similar to this: setsid sleep 5 doesn't block (and forks sleep), setsid sleep 5 | cat blocks for the duration of sleep.

    – A.B
    Apr 6 at 16:49











  • I observed the following situation: [root@d48293f221d9]# timeout -k 1 1 /usr/bin/gssproxy | cat ^C [root@d48293f221d9]# ps aux | grep gssproxy root 24131 0.0 0.0 59732 588 ? Ssl 07:44 0:00 /usr/bin/gssproxy where timeout does not cause a termination after 1 second, as I would expect. Would you have any idea why?

    – MLStudent
    2 days ago


















2















I use gssproxy under Arch Linux, in particular



Name : gssproxy
Version : 0.8.0-1


I encountered the following behavior: When trying to pipe the output of
/usr/bin/gssproxy
like so



/usr/bin/gssproxy | cat



it blocks.
However, when I just run this command:
/usr/bin/gssproxy it does not block, but creates another process in the background



root 13720 0.0 0.0 59732 584 ? Ssl 11:44 0:00 /usr/bin/gssproxy



and exists.



I acknowledge that there is probably no point in piping the output of gssproxy, but nevertheless I am still wondering why this behavior occurs? In particular, what causes cat to block?



EDIT:



By blocking, I mean that the following command:



timeout -k 1 1 /usr/bin/gssproxy | cat,



does not terminate, while



timeout -k 1 1 /usr/bin/gssproxy



terminates immediately. Both command spawn gssproxy process in the background. I am wondering why the first command
does not terminate after 1 second as I would expect?










share|improve this question









New contributor




MLStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1





    How do you see that it's blocked? gssproxy is a daemon program. I would not be surprised if it simple tests to see whether it's standard output is connected to a terminal or not, and if it's not it may simply decide to not output anything (because it thinks it's running as it should be running, in the background). If it's connected to a terminal, it obviously re-executes itself in the background.

    – Kusalananda
    Apr 6 at 12:33












  • It might be similar to this: setsid sleep 5 doesn't block (and forks sleep), setsid sleep 5 | cat blocks for the duration of sleep.

    – A.B
    Apr 6 at 16:49











  • I observed the following situation: [root@d48293f221d9]# timeout -k 1 1 /usr/bin/gssproxy | cat ^C [root@d48293f221d9]# ps aux | grep gssproxy root 24131 0.0 0.0 59732 588 ? Ssl 07:44 0:00 /usr/bin/gssproxy where timeout does not cause a termination after 1 second, as I would expect. Would you have any idea why?

    – MLStudent
    2 days ago














2












2








2








I use gssproxy under Arch Linux, in particular



Name : gssproxy
Version : 0.8.0-1


I encountered the following behavior: When trying to pipe the output of
/usr/bin/gssproxy
like so



/usr/bin/gssproxy | cat



it blocks.
However, when I just run this command:
/usr/bin/gssproxy it does not block, but creates another process in the background



root 13720 0.0 0.0 59732 584 ? Ssl 11:44 0:00 /usr/bin/gssproxy



and exists.



I acknowledge that there is probably no point in piping the output of gssproxy, but nevertheless I am still wondering why this behavior occurs? In particular, what causes cat to block?



EDIT:



By blocking, I mean that the following command:



timeout -k 1 1 /usr/bin/gssproxy | cat,



does not terminate, while



timeout -k 1 1 /usr/bin/gssproxy



terminates immediately. Both command spawn gssproxy process in the background. I am wondering why the first command
does not terminate after 1 second as I would expect?










share|improve this question









New contributor




MLStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I use gssproxy under Arch Linux, in particular



Name : gssproxy
Version : 0.8.0-1


I encountered the following behavior: When trying to pipe the output of
/usr/bin/gssproxy
like so



/usr/bin/gssproxy | cat



it blocks.
However, when I just run this command:
/usr/bin/gssproxy it does not block, but creates another process in the background



root 13720 0.0 0.0 59732 584 ? Ssl 11:44 0:00 /usr/bin/gssproxy



and exists.



I acknowledge that there is probably no point in piping the output of gssproxy, but nevertheless I am still wondering why this behavior occurs? In particular, what causes cat to block?



EDIT:



By blocking, I mean that the following command:



timeout -k 1 1 /usr/bin/gssproxy | cat,



does not terminate, while



timeout -k 1 1 /usr/bin/gssproxy



terminates immediately. Both command spawn gssproxy process in the background. I am wondering why the first command
does not terminate after 1 second as I would expect?







pipe timeout






share|improve this question









New contributor




MLStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




MLStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago







MLStudent













New contributor




MLStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Apr 6 at 11:49









MLStudentMLStudent

112




112




New contributor




MLStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





MLStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






MLStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 1





    How do you see that it's blocked? gssproxy is a daemon program. I would not be surprised if it simple tests to see whether it's standard output is connected to a terminal or not, and if it's not it may simply decide to not output anything (because it thinks it's running as it should be running, in the background). If it's connected to a terminal, it obviously re-executes itself in the background.

    – Kusalananda
    Apr 6 at 12:33












  • It might be similar to this: setsid sleep 5 doesn't block (and forks sleep), setsid sleep 5 | cat blocks for the duration of sleep.

    – A.B
    Apr 6 at 16:49











  • I observed the following situation: [root@d48293f221d9]# timeout -k 1 1 /usr/bin/gssproxy | cat ^C [root@d48293f221d9]# ps aux | grep gssproxy root 24131 0.0 0.0 59732 588 ? Ssl 07:44 0:00 /usr/bin/gssproxy where timeout does not cause a termination after 1 second, as I would expect. Would you have any idea why?

    – MLStudent
    2 days ago













  • 1





    How do you see that it's blocked? gssproxy is a daemon program. I would not be surprised if it simple tests to see whether it's standard output is connected to a terminal or not, and if it's not it may simply decide to not output anything (because it thinks it's running as it should be running, in the background). If it's connected to a terminal, it obviously re-executes itself in the background.

    – Kusalananda
    Apr 6 at 12:33












  • It might be similar to this: setsid sleep 5 doesn't block (and forks sleep), setsid sleep 5 | cat blocks for the duration of sleep.

    – A.B
    Apr 6 at 16:49











  • I observed the following situation: [root@d48293f221d9]# timeout -k 1 1 /usr/bin/gssproxy | cat ^C [root@d48293f221d9]# ps aux | grep gssproxy root 24131 0.0 0.0 59732 588 ? Ssl 07:44 0:00 /usr/bin/gssproxy where timeout does not cause a termination after 1 second, as I would expect. Would you have any idea why?

    – MLStudent
    2 days ago








1




1





How do you see that it's blocked? gssproxy is a daemon program. I would not be surprised if it simple tests to see whether it's standard output is connected to a terminal or not, and if it's not it may simply decide to not output anything (because it thinks it's running as it should be running, in the background). If it's connected to a terminal, it obviously re-executes itself in the background.

– Kusalananda
Apr 6 at 12:33






How do you see that it's blocked? gssproxy is a daemon program. I would not be surprised if it simple tests to see whether it's standard output is connected to a terminal or not, and if it's not it may simply decide to not output anything (because it thinks it's running as it should be running, in the background). If it's connected to a terminal, it obviously re-executes itself in the background.

– Kusalananda
Apr 6 at 12:33














It might be similar to this: setsid sleep 5 doesn't block (and forks sleep), setsid sleep 5 | cat blocks for the duration of sleep.

– A.B
Apr 6 at 16:49





It might be similar to this: setsid sleep 5 doesn't block (and forks sleep), setsid sleep 5 | cat blocks for the duration of sleep.

– A.B
Apr 6 at 16:49













I observed the following situation: [root@d48293f221d9]# timeout -k 1 1 /usr/bin/gssproxy | cat ^C [root@d48293f221d9]# ps aux | grep gssproxy root 24131 0.0 0.0 59732 588 ? Ssl 07:44 0:00 /usr/bin/gssproxy where timeout does not cause a termination after 1 second, as I would expect. Would you have any idea why?

– MLStudent
2 days ago






I observed the following situation: [root@d48293f221d9]# timeout -k 1 1 /usr/bin/gssproxy | cat ^C [root@d48293f221d9]# ps aux | grep gssproxy root 24131 0.0 0.0 59732 588 ? Ssl 07:44 0:00 /usr/bin/gssproxy where timeout does not cause a termination after 1 second, as I would expect. Would you have any idea why?

– MLStudent
2 days ago











1 Answer
1






active

oldest

votes


















0














As @Kusalananda, mentions gssproxy runs as a daemon, the parent process probably wait's untill it's child exits.



Here's a short shell script which emulates the same situation.



$ cat t1
#!/bin/bash
sleep 10 &

$ date; ./t1 | cat ; date
Sun Apr 7 10:59:02 BST 2019
Sun Apr 7 10:59:12 BST 2019


The date commands are there purely to show that after the subprocess exists (10 seconds) cat terminates






share|improve this answer























  • Thanks! But why is it that timeout -k 1 1 /usr/bin/gssproxy | cat does not cause the gssproxy process to exit?

    – MLStudent
    2 days ago











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
);



);






MLStudent is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510894%2fcat-blocking-when-piping-output-from-usr-bin-gssproxy-timeout-k-1-1-usr-bin%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









0














As @Kusalananda, mentions gssproxy runs as a daemon, the parent process probably wait's untill it's child exits.



Here's a short shell script which emulates the same situation.



$ cat t1
#!/bin/bash
sleep 10 &

$ date; ./t1 | cat ; date
Sun Apr 7 10:59:02 BST 2019
Sun Apr 7 10:59:12 BST 2019


The date commands are there purely to show that after the subprocess exists (10 seconds) cat terminates






share|improve this answer























  • Thanks! But why is it that timeout -k 1 1 /usr/bin/gssproxy | cat does not cause the gssproxy process to exit?

    – MLStudent
    2 days ago















0














As @Kusalananda, mentions gssproxy runs as a daemon, the parent process probably wait's untill it's child exits.



Here's a short shell script which emulates the same situation.



$ cat t1
#!/bin/bash
sleep 10 &

$ date; ./t1 | cat ; date
Sun Apr 7 10:59:02 BST 2019
Sun Apr 7 10:59:12 BST 2019


The date commands are there purely to show that after the subprocess exists (10 seconds) cat terminates






share|improve this answer























  • Thanks! But why is it that timeout -k 1 1 /usr/bin/gssproxy | cat does not cause the gssproxy process to exit?

    – MLStudent
    2 days ago













0












0








0







As @Kusalananda, mentions gssproxy runs as a daemon, the parent process probably wait's untill it's child exits.



Here's a short shell script which emulates the same situation.



$ cat t1
#!/bin/bash
sleep 10 &

$ date; ./t1 | cat ; date
Sun Apr 7 10:59:02 BST 2019
Sun Apr 7 10:59:12 BST 2019


The date commands are there purely to show that after the subprocess exists (10 seconds) cat terminates






share|improve this answer













As @Kusalananda, mentions gssproxy runs as a daemon, the parent process probably wait's untill it's child exits.



Here's a short shell script which emulates the same situation.



$ cat t1
#!/bin/bash
sleep 10 &

$ date; ./t1 | cat ; date
Sun Apr 7 10:59:02 BST 2019
Sun Apr 7 10:59:12 BST 2019


The date commands are there purely to show that after the subprocess exists (10 seconds) cat terminates







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









X TianX Tian

7,83512237




7,83512237












  • Thanks! But why is it that timeout -k 1 1 /usr/bin/gssproxy | cat does not cause the gssproxy process to exit?

    – MLStudent
    2 days ago

















  • Thanks! But why is it that timeout -k 1 1 /usr/bin/gssproxy | cat does not cause the gssproxy process to exit?

    – MLStudent
    2 days ago
















Thanks! But why is it that timeout -k 1 1 /usr/bin/gssproxy | cat does not cause the gssproxy process to exit?

– MLStudent
2 days ago





Thanks! But why is it that timeout -k 1 1 /usr/bin/gssproxy | cat does not cause the gssproxy process to exit?

– MLStudent
2 days ago










MLStudent is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















MLStudent is a new contributor. Be nice, and check out our Code of Conduct.












MLStudent is a new contributor. Be nice, and check out our Code of Conduct.











MLStudent is a new contributor. Be nice, and check out our Code of Conduct.














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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510894%2fcat-blocking-when-piping-output-from-usr-bin-gssproxy-timeout-k-1-1-usr-bin%23new-answer', 'question_page');

);

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







SQM6Yi HBO,ETbe oonhxD7rifi2 XzeigF dkyH8
O18,E,XtdzWEbNMXU QY sPUTYAV5,ZIM,t,tr,lBTpvQU yWTlV2 xs UQ8

Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

NetworkManager fails with “Could not find source connection”Trouble connecting to VPN using network-manager, while command line worksHow can I be notified about state changes to a VPN adapterBacktrack 5 R3 - Refuses to connect to VPNFeed all traffic through OpenVPN for a specific network namespace onlyRun daemon on startup in Debian once openvpn connection establishedpfsense tcp connection between openvpn and lan is brokenInternet connection problem with web browsers onlyWhy does NetworkManager explicitly support tun/tap devices?Browser issues with VPNTwo IP addresses assigned to the same network card - OpenVPN issues?Cannot connect to WiFi with nmcli, although secrets are provided

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.