mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 00:44:55 -06:00
Apply PR feedback
This commit is contained in:
parent
7cf58493ee
commit
e9b5cc46f5
@ -42,6 +42,7 @@ void ContainerEventTracker::ContainerTrackingReference::Reset()
|
||||
{
|
||||
m_tracker->UnregisterContainerStateUpdates(m_id);
|
||||
m_tracker = nullptr;
|
||||
m_id = {};
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +53,7 @@ ContainerEventTracker::ContainerTrackingReference::~ContainerTrackingReference()
|
||||
|
||||
ContainerEventTracker::ContainerEventTracker(WSLAVirtualMachine& virtualMachine)
|
||||
{
|
||||
ServiceProcessLauncher launcher{"/usr/bin/nerdctl", {"/usr/bin/nerdctl", "events", "--format", "{{json .}}"}, {}, common::ProcessFlags::Stdout};
|
||||
ServiceProcessLauncher launcher{nerdctlPath, {nerdctlPath, "events", "--format", "{{json .}}"}, {}, common::ProcessFlags::Stdout};
|
||||
|
||||
// Redirect stderr to /dev/null to avoid pipe deadlocks.
|
||||
launcher.AddFd({.Fd = 2, .Type = WSLAFdTypeLinuxFileOutput, .Path = "/dev/null"});
|
||||
|
||||
@ -28,6 +28,8 @@ enum class ContainerEvent
|
||||
Destroy
|
||||
};
|
||||
|
||||
constexpr const char* nerdctlPath = "/usr/bin/nerdctl";
|
||||
|
||||
class ContainerEventTracker
|
||||
{
|
||||
public:
|
||||
|
||||
@ -18,8 +18,6 @@ Abstract:
|
||||
|
||||
using wsl::windows::service::wsla::WSLAContainer;
|
||||
|
||||
constexpr const char* nerdctlPath = "/usr/bin/nerdctl";
|
||||
|
||||
// Constants for required default arguments for "nerdctl run..."
|
||||
static std::vector<std::string> defaultNerdctlRunArgs{//"--pull=never", // TODO: Uncomment once PullImage() is implemented.
|
||||
"--net=host", // TODO: default for now, change later
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user