Project

General

Profile

Actions

Bug #370

closed

system( test -e filename ) on Solaris

Added by Anonymous almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
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.

Actions #1

Updated by Anonymous almost 13 years ago

  • Status changed from New to Closed
  • Assignee set to Anonymous

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

Actions

Also available in: Atom PDF