Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Clever Code
  4. All is well!

All is well!

Scheduled Pinned Locked Moved Clever Code
helpsysadminlinuxquestion
4 Posts 4 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sebastian Schneider
    wrote on last edited by
    #1

    Well, we have a SW that tunes a parameter set stored in a file. It is called "FoTune" and is called with a simple command-line parameter. The executable exists for both Linux (since recently) and Windows (for ages). I was tasked with rewriting the service-program that called this program and evaluated the output it writes. This is done once every few minutes. Since the service-program needs to run on both OSes as well, I (lazily) chose "system()" for command invocation. Actually, I lazily copied it from the old implementation. Under Windows, all went well. Under Linux, neither the parameter set nor the output were changed or generated. But, out of nowhere, there was a statement on the console: "All is well!". I stared at that line for quite some time and was about to go insane (neither source-code contained anything like that) when I found the solution. The software is run on a server. Recompilation requires a platform-specific "service handler" to be updated with the service-program executable, requiring a restart, and noone wanted to do that. And here goes: In the service-program source-code (the old one, which had only run under windows), the program name was written in all lower-case and had a significant typo: it read "fortune" instead of "fotune". And since the original coder did not want to go through the process of updating the main handler, he just renamed the executable on the Windows-Machine to "fortune.exe". Now, I neither caught the "all-lower-case"-spelling, nor the typo, nor the missing extension. Which meant that under Linux, "fortune" - a "fortune cookie tool" - was called. And someone had removed all entries but one from its default input-file. The one line remaining? "All is well!". And I was VERY tempted to rename "fortune" to "fotune" to fix the bug.

    Q M C 3 Replies Last reply
    0
    • S Sebastian Schneider

      Well, we have a SW that tunes a parameter set stored in a file. It is called "FoTune" and is called with a simple command-line parameter. The executable exists for both Linux (since recently) and Windows (for ages). I was tasked with rewriting the service-program that called this program and evaluated the output it writes. This is done once every few minutes. Since the service-program needs to run on both OSes as well, I (lazily) chose "system()" for command invocation. Actually, I lazily copied it from the old implementation. Under Windows, all went well. Under Linux, neither the parameter set nor the output were changed or generated. But, out of nowhere, there was a statement on the console: "All is well!". I stared at that line for quite some time and was about to go insane (neither source-code contained anything like that) when I found the solution. The software is run on a server. Recompilation requires a platform-specific "service handler" to be updated with the service-program executable, requiring a restart, and noone wanted to do that. And here goes: In the service-program source-code (the old one, which had only run under windows), the program name was written in all lower-case and had a significant typo: it read "fortune" instead of "fotune". And since the original coder did not want to go through the process of updating the main handler, he just renamed the executable on the Windows-Machine to "fortune.exe". Now, I neither caught the "all-lower-case"-spelling, nor the typo, nor the missing extension. Which meant that under Linux, "fortune" - a "fortune cookie tool" - was called. And someone had removed all entries but one from its default input-file. The one line remaining? "All is well!". And I was VERY tempted to rename "fortune" to "fotune" to fix the bug.

      Q Offline
      Q Offline
      QuiJohn
      wrote on last edited by
      #2

      That is a GREAT story. Thank you.

      1 Reply Last reply
      0
      • S Sebastian Schneider

        Well, we have a SW that tunes a parameter set stored in a file. It is called "FoTune" and is called with a simple command-line parameter. The executable exists for both Linux (since recently) and Windows (for ages). I was tasked with rewriting the service-program that called this program and evaluated the output it writes. This is done once every few minutes. Since the service-program needs to run on both OSes as well, I (lazily) chose "system()" for command invocation. Actually, I lazily copied it from the old implementation. Under Windows, all went well. Under Linux, neither the parameter set nor the output were changed or generated. But, out of nowhere, there was a statement on the console: "All is well!". I stared at that line for quite some time and was about to go insane (neither source-code contained anything like that) when I found the solution. The software is run on a server. Recompilation requires a platform-specific "service handler" to be updated with the service-program executable, requiring a restart, and noone wanted to do that. And here goes: In the service-program source-code (the old one, which had only run under windows), the program name was written in all lower-case and had a significant typo: it read "fortune" instead of "fotune". And since the original coder did not want to go through the process of updating the main handler, he just renamed the executable on the Windows-Machine to "fortune.exe". Now, I neither caught the "all-lower-case"-spelling, nor the typo, nor the missing extension. Which meant that under Linux, "fortune" - a "fortune cookie tool" - was called. And someone had removed all entries but one from its default input-file. The one line remaining? "All is well!". And I was VERY tempted to rename "fortune" to "fotune" to fix the bug.

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        :laugh: :doh:


        Maximilien Lincourt Your Head A Splode - Strong Bad

        1 Reply Last reply
        0
        • S Sebastian Schneider

          Well, we have a SW that tunes a parameter set stored in a file. It is called "FoTune" and is called with a simple command-line parameter. The executable exists for both Linux (since recently) and Windows (for ages). I was tasked with rewriting the service-program that called this program and evaluated the output it writes. This is done once every few minutes. Since the service-program needs to run on both OSes as well, I (lazily) chose "system()" for command invocation. Actually, I lazily copied it from the old implementation. Under Windows, all went well. Under Linux, neither the parameter set nor the output were changed or generated. But, out of nowhere, there was a statement on the console: "All is well!". I stared at that line for quite some time and was about to go insane (neither source-code contained anything like that) when I found the solution. The software is run on a server. Recompilation requires a platform-specific "service handler" to be updated with the service-program executable, requiring a restart, and noone wanted to do that. And here goes: In the service-program source-code (the old one, which had only run under windows), the program name was written in all lower-case and had a significant typo: it read "fortune" instead of "fotune". And since the original coder did not want to go through the process of updating the main handler, he just renamed the executable on the Windows-Machine to "fortune.exe". Now, I neither caught the "all-lower-case"-spelling, nor the typo, nor the missing extension. Which meant that under Linux, "fortune" - a "fortune cookie tool" - was called. And someone had removed all entries but one from its default input-file. The one line remaining? "All is well!". And I was VERY tempted to rename "fortune" to "fotune" to fix the bug.

          C Offline
          C Offline
          charlieg
          wrote on last edited by
          #4

          priceless....:cool:

          Charlie Gilley Will program for food... Whoever said children were cheaper by the dozen... lied. My son's PDA is an M249 SAW. My other son commutes in an M1A2 Abrams

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups