mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
17 lines
570 B
Go
17 lines
570 B
Go
// Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
// Licensed under the GNU Affero General Public License (AGPL).
|
|
// See License-AGPL.txt in the project root for license information.
|
|
|
|
package process
|
|
|
|
// IsNotChildProcess checks if an error returned by a command
|
|
// execution is an error related to no child processes running
|
|
// This can be seen, for instance, in short lived commands.
|
|
func IsNotChildProcess(err error) bool {
|
|
if err == nil {
|
|
return false
|
|
}
|
|
|
|
return (err.Error() == "wait: no child processes" || err.Error() == "waitid: no child processes")
|
|
}
|