~ubuntu-branches/debian/sid/gmsh/sid

« back to all changes in this revision

Viewing changes to Common/GmshSocket.h

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-08-26 22:45:27 UTC
  • mfrom: (1.3.25)
  • Revision ID: package-import@ubuntu.com-20150826224527-wiqnz3dwz6ap8tty
Tags: 2.10.1+dfsg1-1
* [4c450d1] Update d/watch.
* [90ca918] Imported Upstream version 2.10.1+dfsg1. (Closes: #793245)
* [af26665] Use any-arch instead of list of archs.
* [e94c6d2] Refresh patches.
* [6ab417f] Update d/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
330
330
  virtual int NonBlockingWait(double waitint, double timeout, int socket=-1) = 0;
331
331
  // start the client by launching "exe args" (args is supposed to contain
332
332
  // '%s' where the socket name should appear)
333
 
  int Start(const char *exe, const char *args, const char *sockname, double timeout)
 
333
  int Start(const std::string &exe, const std::string &args, const std::string &sockname,
 
334
            double timeout)
334
335
  {
335
 
    if(!sockname) throw "Invalid (null) socket name";
336
336
    _sockname = sockname;
337
337
    int tmpsock;
338
338
    if(strstr(_sockname.c_str(), "/") || strstr(_sockname.c_str(), "\\") ||
395
395
      }
396
396
    }
397
397
 
398
 
    if((exe && strlen(exe)) || (args && strlen(args))){
 
398
    if(exe.size() || args.size()){
399
399
      char s[1024];
400
 
      sprintf(s, args, _sockname.c_str());
 
400
      sprintf(s, args.c_str(), _sockname.c_str());
401
401
      NonBlockingSystemCall(exe, s); // starts the solver
402
402
    }
403
403
    else{