mirror of
https://github.com/NixOS/nix
synced 2025-07-02 17:41:48 +02:00
18 lines
362 B
C++
18 lines
362 B
C++
#include "nix/util/util.hh"
|
|
#include "nix/util/monitor-fd.hh"
|
|
|
|
#include <sys/file.h>
|
|
#include <gtest/gtest.h>
|
|
|
|
namespace nix {
|
|
TEST(MonitorFdHup, shouldNotBlock)
|
|
{
|
|
Pipe p;
|
|
p.create();
|
|
{
|
|
// when monitor gets destroyed it should cancel the
|
|
// background thread and do not block
|
|
MonitorFdHup monitor(p.readSide.get());
|
|
}
|
|
}
|
|
}
|