13
$\begingroup$

Your sysop recently quit due to what the law division calls "internal struggles". Less fancily, he hated you, and he hated his job. As a parting gift, he left you a program entitled SwanSong.c. Being curious and slightly daft, you of course decide to execute it. Your console immediately floods with errors to standard error output:

stderr
------
Line 4: Cannot exec a shared library directly.  
Line 5: Link has been severed.  
Line 5: Attempting to link in too many shared libraries.  
Line 7: Srmount error.  
Line 8: Too many users.  
Line 9: Name not unique on network.  
Line 14: RFS specific error.  
Line 18: Remote address changed.  
Line 18: Interrupted system call should be restarted.  
Line 18: Socket operation on non-socket.  

What does your sysop's swan song mean?


Footnote: Bonus points if you can write a program that returns this output. I'm pretty sure it's not possible, and it's definitely not a requirement to solve the problem.

$\endgroup$
  • 8
    $\begingroup$ The bonus is easy... print "Cannot exec a shared library directly" ... ;) $\endgroup$ – Aza Aug 28 '15 at 16:43
  • 1
    $\begingroup$ @Emrakul ah, yes, the old "hard-coded error messages" - I know thee well. :) $\endgroup$ – Bailey M Aug 28 '15 at 16:44
  • 1
    $\begingroup$ Are you sure these write to stdout and not stderr? $\endgroup$ – Ian MacDonald Aug 28 '15 at 17:55
  • $\begingroup$ @IanMacDonald nope, not sure at all. In fact, they probably do print to stderr. It's not super relevant to the puzzle itself though. $\endgroup$ – Bailey M Aug 28 '15 at 18:01
  • $\begingroup$ Could probably leverage this answer to get you to an executable that would output these error codes... however, you may want to do this on a machine you don't care about (like an easily-reflashable Raspberry Pi or something), just in case. $\endgroup$ – Ian MacDonald Aug 28 '15 at 18:10
18
$\begingroup$

These are Linux error messages, which can be looked up here: http://www.ioplex.com/~miallen/errcmp.html

83 (ELIBEXEC): Cannot exec a shared library directly
67 (ENOLINK): Link has been severed
82 (ELIBMAX): Attempting to link in too many shared libraries
69 (ESRMNT): Srmount error
87 (EUSERS): Too many users
76 (ENOTUNIQ): Name not unique on network
73 (EDOTDOT): RFS specific error
78 (EREMCHG): Remote address changed
85 (ERESTART): Interrupted system call should be restarted
88 (ENOTSOCK): Socket operation on non-socket

Convert the error numbers to ASCII to get the message:

SCREWLINUX

$\endgroup$
  • $\begingroup$ Correctamundo. You get a fun little easter egg if you try to interpret this by line numbers instead, by the way. :) $\endgroup$ – Bailey M Aug 28 '15 at 18:01
  • 3
    $\begingroup$ Amusingly, I'm pretty sure some of these errors can never reasonably happen on Linux; ESRMNT and EDOTDOT seem to be Solaris-specific. Possibly the only reason they even exist is because Solaris has Linux binary compatibility, so a Linux app might on rare occasion encounter an error generated by the Solaris kernel :) $\endgroup$ – hobbs Aug 29 '15 at 4:51
14
$\begingroup$

For your bonus points, here's a (rather contrived) Perl program that will produce the desired output:

#!/usr/bin/perl
sub ugh { $! = vec "SCREWLINUX", $x++, 8; warn "Line " . (caller)[2] . ": $!\n" }

ugh;
ugh ugh;

ugh;
ugh;
ugh;




ugh;



ugh ugh ugh;
$\endgroup$
  • 4
    $\begingroup$ +1 For making me laugh with all the ughs. Certainly the response I'd get out of a stream of errors that made no sense. $\endgroup$ – Kingrames Aug 28 '15 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.