Search Results

Search found 25401 results on 1017 pages for 'adobe partner program'.

Page 151/1017 | < Previous Page | 147 148 149 150 151 152 153 154 155 156 157 158  | Next Page >

  • How can a C/C++ program put itself into background?

    - by Larry Gritz
    What's the best way for a running C or C++ program that's been launched from the command line to put itself into the background, equivalent to if the user had launched from the unix shell with '&' at the end of the command? (But the user didn't.) It's a GUI app and doesn't need any shell I/O, so there's no reason to tie up the shell after launch. But I want a shell command launch to be auto-backgrounded without the '&' (or on Windows). Ideally, I want a solution that would work on any of Linux, OS X, and Windows. (Or separate solutions that I can select with #ifdef.) It's ok to assume that this should be done right at the beginning of execution, as opposed to somewhere in the middle. One solution is to have the main program be a script that launches the real binary, carefully putting it into the background. But it seems unsatisfying to need these coupled shell/binary pairs. Another solution is to immediately launch another executed version (with 'system' or CreateProcess), with the same command line arguments, but putting the child in the background and then having the parent exit. But this seems clunky compared to the process putting itself into background. Edited after a few answers: Yes, a fork() (or system(), or CreateProcess on Windows) is one way to sort of do this, that I hinted at in my original question. But all of these solutions make a SECOND process that is backgrounded, and then terminate the original process. I was wondering if there was a way to put the EXISTING process into the background. One difference is that if the app was launched from a script that recorded its process id (perhaps for later killing or other purpose), the newly forked or created process will have a different id and so will not be controllable by any launching script, if you see what I'm getting at. Edit #2: fork() isn't a good solution for OS X, where the man page for 'fork' says that it's unsafe if certain frameworks or libraries are being used. I tried it, and my app complains loudly at runtime: "The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec()." I was intrigued by daemon(), but when I tried it on OS X, it gave the same error message, so I assume that it's just a fancy wrapper for fork() and has the same restrictions. Excuse the OS X centrism, it just happens to be the system in front of me at the moment. But I am indeed looking for a solution to all three platforms.

    Read the article

  • Is a C++ compiler allowed to emit different machine code compiling the same program?

    - by sharptooth
    Consider a situation. We have some specific C++ compiler, a specific set of compiler settings and a specific C++ program. We compile that specific programs with that compiler and those settings two times, doing a "clean compile" each time. Should the machine code emitted be the same (I don't mean timestamps and other bells and whistles, I mean only real code that will be executed) or is it allowed to vary from one compilation to another?

    Read the article

  • Can XCode draw the call graph of a program?

    - by Werner
    Hi, I am new to Mac OSX, and I wonder if Xcode can generate , for a given C++ source code, the call graph of the program in a visual way. I also wonder if for each function, and after a run, whether it can also print the %time spent on the function If so, I would thank really some links with tutorials or info, after googling I did not find anything relevant Thanks

    Read the article

  • How to elegantly say "something unknown is wrong with this program"?

    - by Anvaka
    Medicine has the term idiopathic cardiomyopathy. Cardiomyopathy means something is wrong with your heart, and idiopathic means "we have no idea why yours isn't working." I know we have heisenbugs, bohrbugs, mandelbugs, and so on, but I feel I'm lacking one more buzzword: what's the IT cousin to idiopathic cardiomyopathy? What's an elegant word or phrase for "something unknown is wrong with this program"?

    Read the article

  • Simple prolog program. Getting error: >/2: Arguments are not sufficiently instantiated

    - by user1279812
    I made a prolog program posAt(List1,P,List2) that tests whether the element at position P of List1 and List2 are equal: posAt([X|Z],1,[Y|W]) :- X=Y. posAt([Z|X],K,[W|Y]) :- K1, Kr is K - 1, posAt(X,Kr,Y). When testing: ?- posAt([1,2,3],X,[a,2,b]). I expected an output of X=2 but instead I got the following error: ERROR: /2: Arguments are not sufficiently instantiated Why am I getting this error?

    Read the article

  • java:I am trying to create Shotcut of any abc.exe through java program.

    - by Sanjeev
    I am making an installer in java swing it almost completed only one thing is left to do that is to create desktop shortcut of our software.I do not want to copy software on desktop but I want to create instance of that software like other MS software. How it can be done please help me. I am already copied my software in c:/Program files by using copy directory and I want to create shortcut on desktop .

    Read the article

< Previous Page | 147 148 149 150 151 152 153 154 155 156 157 158  | Next Page >