Skip to content

Split apart //cuttlefish/process:command_subprocess#2855

Open
Databean wants to merge 8 commits into
google:mainfrom
Databean:cuttlefish_process_ext
Open

Split apart //cuttlefish/process:command_subprocess#2855
Databean wants to merge 8 commits into
google:mainfrom
Databean:cuttlefish_process_ext

Conversation

@Databean

Copy link
Copy Markdown
Member

This was formerly //cuttlefish/common/libs/utils:subprocess, and is now broken apart.

Bug: b/533572315

Databean added 8 commits July 14, 2026 15:06
This was in command_subprocess.* but only had one caller which was in a
different file.

Bug: b/533572315
This did not have interactions with anything else in Subprocess.

Bug: b/533572315
All other re-exported headers have been removed.

Bug: b/533572315
@Databean Databean requested a review from jemoreira July 14, 2026 22:16
int Execute(std::vector<std::string> commands);

/**
* Similar as the two above but returns CF_ERR instead of -1, and siginfo_t

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there is only one above

* For now, too many callsites expects int, and needs quite a lot of changes
* if we change the return type.
*/
int Execute(std::vector<std::string> commands);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The parameter should be named command, otherwise it gives the impression that many subprocesses will run.

Comment on lines +29 to +31
kStopFailure, /* Failed to stop the subprocess. */
kStopCrash, /* Attempted to stop the subprocess cleanly, but that failed. */
kStopSuccess, /* The subprocess exited in the expected way. */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Stop is redundant in these names, consider:

kFailure,
kCrash,
kSuccess,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants