This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 172524 - Would be nice to be able to add a prefix to the binary program taht gets executed through the IDE.
Summary: Would be nice to be able to add a prefix to the binary program taht gets exec...
Status: RESOLVED DUPLICATE of bug 154529
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrew Krasny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-17 20:58 UTC by Thomas Preisler
Modified: 2010-05-21 08:00 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preisler 2009-09-17 20:58:58 UTC
originally CR 6878363

Description:
When setting a project in SunStudio, you can set the arguments to be passed to the binary. You can therefor run the built binary directly from the IDE.
However I'm working on an internal project that call libcpc (hardware counters) and this can not be run as a simple user but must be root or at lease hace 
some additional priviliges.
Unfortunatly we can not specify a "prefix" on the run parameters of the IDE. If it was possible, I couls simple prefix my binary with "pfexec" (I'm running 
OpenSolaris) to make it work.

Up to now the only turnaround is to specifically add the needed privileges to my SunStudio process ussing "ppriv"
*** (#1 of 1): 2009-09-02 08:07:43 PDT amir


Public Comments:
Another option would be to run the IDE with pfexec (privileges will be inherited then) or to change your default priviliges (permanently. with something like 
usermod -K defaultpriv=basic,proc_clock_highres jdoe
)..

But in general... the idea of having more options of execution command-line customization could be discussed...
*** (#1 of 2): 2009-09-02 23:41:58 PDT andrew.krasny@sun.com

For running it should be straightforward for the IDE to prefix
a wrapper (nohup, time, collect ...come to mind as simple examples).
But what about during debugging?
It's the debugger that runs the process so _it_ should do the prefixing!
Also note that in this specific example of pfexec it makes sense to start
the debugger with pfexec, not the a.out. That would help the debugger 
attach to processes that it would otherwise not have privileges.

In summary you need at least three variations to support various scernarios:
- prefixing a.out by IDE during running
- prefixing a.out by debugger engine during debug runs
- prefixing debugger engine by IDE.
*** (#2 of 2): 2009-09-03 13:02:56 PDT ivan
Comment 1 Alexey Vladykin 2010-05-21 08:00:57 UTC

*** This bug has been marked as a duplicate of bug 154529 ***