Community
Participate
Working Groups
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
This kind of missing argv[0] would cause "/bin/ls" behave abnormally.
Yes, the service does not add process image filename as argv[0]. It is intensional. While argv[0] should point to a filename that is associated with the process being started, it is not always same as process image filename, which can instead point to a shell or interpreter. Correct way to start /bin/ls is: Processes start "/home" "/bin/ls" ["/bin/ls","arg1","arg2"] [] false I have updated docs to reflect that.
Moving bugs to new home for IP log.