Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tcf-dev] [Bug 313719] New: Reference agent: argv[0] is missing in the execve() for Processes.start command

https://bugs.eclipse.org/bugs/show_bug.cgi?id=313719 
Product/Component: Target Management / TCF

           Summary: Reference agent: argv[0] is missing in the execve()
                    for Processes.start command
    Classification: DSDP
           Product: Target Management
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: TCF
        AssignedTo: dsdp.tm.tcf-inbox@xxxxxxxxxxx
        ReportedBy: lianhao.lu@xxxxxxxxx
         QAContact: martin.oberhuber@xxxxxxxxxxxxx


Typically, in a C program, the main function gets its argv[0] paramter as its
program name. The reference agent uses execve(exec, args, envp) system call to
process the Processes.start command. But it doesn't set the first element of
the args array to the application name.

Sending the following JSON to agent would results the "./foo" application
getting argc=2, argv[0]="-arg1", argv[1]="-arg2". Not the argc=3,
argv[0]="./foo", argv[1]="-arg1", argv[2]="-arg2" as it expects. This could
cause some application reporting parameter error.

C <token> Processes start "/home" "./foo" ["arg1","arg2"] [] false

-- 
Configure bugmail: https://bugs.eclipse.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


Back to the top