LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-14-2022, 01:14 AM   #1
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Rep: Reputation: Disabled
Weird nc behavior on Slackware. Connection doesn't close.


So, I tried to post this with the commands in the post and Cloudflare blocked the post. I had to put the commands in images for Cloudflare not to block the post. Sorry for the extra step


In terminal 1, I run: [see picture]


In terminal 2, I run: [see picture]


The message comes through to terminal 1 just fine but nc holds the connection open. I ran this on a Linux Mint install and the message comes through and then the connection closes.

Any idea how to get Slackware's nc to close the connection after the message?

UPDATE: -q1 needs to be added to the 'client', not the 'server'
Attached Thumbnails
Click image for larger version

Name:	Weirdnc.png
Views:	28
Size:	7.1 KB
ID:	40038   Click image for larger version

Name:	Weirdnc2.png
Views:	23
Size:	59.4 KB
ID:	40040  

Last edited by arfon; 12-14-2022 at 07:11 AM.
 
Old 12-14-2022, 01:53 AM   #2
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082
-q1 must be on Term. #2
Code:
-q secs                 quit after EOF on stdin and delay of secs
Because you are sending data from Term. #2 to Term. #1

Last edited by marav; 12-14-2022 at 01:56 AM.
 
Old 12-14-2022, 05:12 AM   #3
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Original Poster
Rep: Reputation: Disabled
Unfortunately, the -q1 didn't work. I think this is because I'm using an echo and not a cat so no EOF.
 
Old 12-14-2022, 05:16 AM   #4
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082
It works here
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20221214_121449.png
Views:	16
Size:	27.7 KB
ID:	40041  
 
Old 12-14-2022, 07:07 AM   #5
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Original Poster
Rep: Reputation: Disabled
Yeah, I can't explain it... I'm running Slackware64-current-
Attached Thumbnails
Click image for larger version

Name:	Weirdnc3.png
Views:	6
Size:	128.6 KB
ID:	40044  
 
Old 12-14-2022, 07:10 AM   #6
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Original Poster
Rep: Reputation: Disabled
I'm a dork.... I put -q1 in the wrong terminal... It works, thanks!
 
2 members found this post helpful.
Old 12-14-2022, 11:03 AM   #7
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082
Quote:
Originally Posted by arfon View Post
I'm a dork.... I put -q1 in the wrong terminal... It works, thanks!
Yep
See #2 ;-)
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
close terminal mean close background process? Niceman2005 Linux - General 7 05-27-2010 02:58 PM
how to close port 1050 please help how to close it. mr norm Linux - General 1 09-12-2008 07:57 AM
mplayer 'close all' doesn't close anything allelopath Linux - Software 2 12-08-2005 09:40 AM
HP Photosmart weird weird weird.... Vlad_M Linux - General 5 02-20-2005 05:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration