The Mud Connector

Author Topic: A big -sigh- for SIGHUP, and nohup isn't working...  (Read 1458 times)

melopene

  • Posts: 0
    • View Profile
A big -sigh- for SIGHUP, and nohup isn't working...
« on: March 27, 2011, 7:18 PM »
Hey folks, long time. Really really long time. I used to
post bunches around here, like, 5-10 years ago.

I found myself with a LOT of free time on my hands, and
thought I'd boot up my mud code again, see how far I got,
maybe tinker a bit. A friend who runs an ISP set me up with
a shell account on his backhaul server, and amazingly I was
able to compile the bastardized version of ROM/ROT/I don't
even know what with just a few minor errors and boot the
thing up.

So, here's the issue: SIGHUP. I continually get the
following error thrown (when I run it in GDB):
Program received signal SIGHUP, Hangup.
0x00002aaaaafcd323 in __select_nocancel () from
/lib64/libc.so.6

Yeah, I've tried running both the startup script and a
manual boot using 'nohup', but no dice. I've found a few
references to bits and pieces of code that can be added in
to the executable, but seeing as how it's been five years
since I've messed around with code at all (much less linux),
I'm not starting out with that sans guidance.

Also, I understand this could potentially be related to a
firewall issue, from some other reading, but am unsure how
to investigate.

Any suggestions, moving forward?

Sombalance

  • New to TMC
  • *
  • Posts: 14
    • View Profile
RE: A big -sigh- for SIGHUP, and nohup isn't working...
« Reply #1 on: March 27, 2011, 11:13 PM »
I hate to ask, but are you placing an & at the end of the
command when you run it nohup?

nohup ./some_mud_command &

Sombalance

melopene

  • Posts: 0
    • View Profile
RE: A big -sigh- for SIGHUP, and nohup isn't working...
« Reply #2 on: March 27, 2011, 11:54 PM »
Of course I am with the startup script - always have, and
unless I've missed something, who knows.

Here's something else curious: Friend says it's actually a
mail server with shell access. The disconnects seem to be
coming at approximately 3 minute intervals, so I think there's
a script on the server trying to kill me off.

Is there a quickie way around it, code-wise, or should I just
find a different shell to tinker on? I was just hoping to be
able to piddle around for a week or two before deciding what I
wanted to do.

Tyche

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • TheSourcery
RE: A big -sigh- for SIGHUP, and nohup isn't working...
« Reply #3 on: March 28, 2011, 1:21 AM »

melopene wrote:
Is there a quickie way around it, code-wise


signal( SIGHUP, SIG_IGN );
Jesus said to him, "I am the way, and the truth, and the life. No one comes to the Father except through me."

melopene

  • Posts: 0
    • View Profile
RE: A big -sigh- for SIGHUP, and nohup isn't working...
« Reply #4 on: March 28, 2011, 2:10 AM »
signal( SIGHUP, SIG_IGN );


Tyche, I've seen that very line of code posted, but with no
reference as to where it should go or how it should be
handled. That's a source of a lot of confusion for me at the
moment, since I've always been wary of messing around in
comm.c.

Tyche

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • TheSourcery
RE: A big -sigh- for SIGHUP, and nohup isn't working...
« Reply #5 on: March 28, 2011, 5:22 AM »
Well there's a similar statement, signal( SIGPIPE, SIG_IGN );, near the beginning of game_loop_unix in stock ROMs.  So insert it before or after there.  

Unless your fingers are tremendously fat, I don't foresee problems.  You might consider the notion of backing up your code manually or using source control before you make changes.
Jesus said to him, "I am the way, and the truth, and the life. No one comes to the Father except through me."

KaVir

  • Jr. Member
  • **
  • Posts: 95
  • God Wars II
    • View Profile
    • God Wars II
RE: A big -sigh- for SIGHUP, and nohup isn't working...
« Reply #6 on: March 28, 2011, 5:38 AM »
Hi melopene, long time no see!

> Here's something else curious: Friend says it's actually
> a mail server with shell access. The disconnects seem to
> be coming at approximately 3 minute intervals, so I think
> there's a script on the server trying to kill me off.

Seems very likely.  Have you tried running a simple stock codebase and seeing if it does the same thing?

They may not be happy about failing to kill your process though.  If you just want to experiment you might be better off using cygwin, or finding space on one of those free mud hosts.
KaVir at God Wars II: godwars2.org 3000
Roomless world. Manual combat. Endless possibilities.


melopene

  • Posts: 0
    • View Profile
RE: A big -sigh- for SIGHUP, and nohup isn't working...
« Reply #7 on: March 28, 2011, 6:13 AM »
KaVir, it's great to see you, as always (and you too,
Tyche!).

Yeah, it's doing the exact same thing even with the code
teak, and even in QuickMUD. I'm so hesitant to find a free
server, because I remember the kind of reputation that there
was back in the day, and I know cygwin will give me tons of
headaches.

Maybe I'll take the plunge, and maybe I'll just decide to
wait until my friend sets up his own linux box. Unless one
of you want to give me a couple weeks' access to see what's
up? :D

It's really great to know y'all are still here.

-Melly


welcor

  • Posts: 0
    • View Profile
RE: A big -sigh- for SIGHUP, and nohup isn't working...
« Reply #8 on: March 28, 2011, 3:45 PM »
melopene wrote:
...and I know cygwin will give me tons of
headaches.
...

While cygwin once was troublesome, it's been cleaned up very much the last couple of years. I suggest you give it a try.

Idealiad

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
RE: A big -sigh- for SIGHUP, and nohup isn't working...
« Reply #9 on: March 28, 2011, 5:38 PM »
There's always the option of Virtualbox or some other VM
software too.