Project

General

Profile

Bug #370

system( test -e filename ) on Solaris

Added by Jeffrey Painter over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
QC_data_checker
Start date:
06/01/2011
Due date:
% Done:

0%

Estimated time:

Description

I saw frequent error messages running the QC tool on GDO2, the Solaris machine which hosts most PCMDI CMIP5 data. For some files there was one message, for others none. The message was “sh: test: Argument expected”. This was a surprise to me because my shell was bash, and the QC scripts are written in bash.

After some time I discovered that the message comes from QC.cpp, QC::openAndLock(), at a line ”system( test.cstr() )”. In this case the string is like test="test -e filename". That’s a legal command in bash, but not in sh. The problem is that system() invokes /bin/sh, and on Solaris, /bin/sh is sh, the original Bourne shell. (On many other systems, I believe that /bin/sh is bash).

I suppose that the test string will have to be rewritten. There are other system() calls in the C++ code, but so far I have not seen any problems with the other ones.

History

#1 Updated by Heinz-Dieter Hollweg over 8 years ago

  • Status changed from New to Closed
  • Assignee set to Heinz-Dieter Hollweg

Resolved.
See QC bug-fix report #2011-06-02

Also available in: Atom PDF