Thread: How do I launch a subprocess?

  1. #1
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    839

    How do I launch a subprocess?

    I tried this:
    Code:
    return system("sudo $PWD/ffxv_cheat_subproc.AppImage");
    but nothing

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    3,748
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    839
    Quote Originally Posted by stahta01 View Post
    Not quite what I was refering to but thanks, it does help me stop using system() at least, I was more on about a sub process that has a relative path, (I did try with ./ instead of $PWD) but when I tried it couldn't locate it despite me being able to find it in the same directory just fine

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,675
    > (I did try with ./ instead of $PWD) but when I tried it couldn't locate it
    If the specified filename includes a slash character, then PATH is ignored, and the file at the specified pathname is executed.
    Nor do the exec functions recognise shell variables.

    Start with a full absolute pathname.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    839
    Quote Originally Posted by Salem View Post
    > (I did try with ./ instead of $PWD) but when I tried it couldn't locate it

    Nor do the exec functions recognise shell variables.

    Start with a full absolute pathname.
    Little late for me to say it but thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Parsing output of subprocess
    By fragrax in forum C Programming
    Replies: 2
    Last Post: 07-15-2008, 08:31 AM
  2. Launch a program
    By fighter92 in forum C++ Programming
    Replies: 1
    Last Post: 06-15-2008, 11:03 AM
  3. How to launch a document?
    By Malefaust in forum C Programming
    Replies: 1
    Last Post: 09-29-2004, 07:53 AM
  4. Trying to launch a site!!!! Please HELP!!!
    By kissa49 in forum C++ Programming
    Replies: 19
    Last Post: 12-28-2003, 06:35 PM
  5. VS.NET launch
    By Govtcheez in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 02-08-2002, 01:13 AM

Tags for this Thread