Changeset 26995


Ignore:
Timestamp:
2013-03-05T11:01:20+13:00 (11 years ago)
Author:
jmt12
Message:

Ensuring that errors go to STDERR and other messages go to STDOUT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb-edit/trunk/src/bin/script/TDBServer.pl

    r26990 r26995  
    185185  if (-e $server_lockfile_path)
    186186  {
    187     print "Error! TDBServer already running!\n";
    188     print "Lockfile found at: " . $server_lockfile_path . "\n";
    189     exit(0);
     187    die("Error! TDBServer already running!\nLockfile found at: " . $server_lockfile_path);
    190188  }
    191189  print "All clear!\n";
     
    196194  if ($result !~ /usage:\s+$tdbexe/)
    197195  {
    198     print "Error! " . $tdbexe . " not available - check path.\n";
    199     exit(0);
     196    die("Error! " . $tdbexe . " not available - check path.");
    200197  }
    201198  print "Found!\n";
     
    222219  if ($pid == 0)
    223220  {
    224     print STDERR "[" . time() . ":" . $server_host . ":" . $server_port . "]\n";
     221    print "[" . time() . ":" . $server_host . ":" . $server_port . "]\n";
    225222    print " * Starting server on " . $server_host . ":" . $server_port . "\n";
    226223    # - create server object
     
    420417    if (!defined $action || $action eq '')
    421418    {
    422       #rint STDERR "Warning! Detected request without action (#" . $the_count . ") - assuming add/update.\n";
     419      print STDERR "Warning! Detected request without action (#" . $the_count . ") - assuming add/update.\n";
    423420      $action = '+';
    424421    }
Note: See TracChangeset for help on using the changeset viewer.