void
release(int descriptor, bool permanent);
+ // Claim the file descriptor DESCRIPTOR for a plugin. This effectively
+ // removes the descriptor from the pool of linker-managed descriptors,
+ // as the plugin will assume responsibility for closing it.
+ void
+ claim_for_plugin(int descriptor);
+
private:
// Information kept for a descriptor.
struct Open_descriptor
bool inuse;
// Whether this is a write descriptor.
bool is_write;
+ // Whether the descriptor has been claimed for a plugin.
+ bool is_claimed;
};
bool
release_descriptor(int descriptor, bool permanent)
{ descriptors.release(descriptor, permanent); }
+inline void
+claim_descriptor_for_plugin(int descriptor)
+{ descriptors.claim_for_plugin(descriptor); }
+
} // End namespace gold.
#endif // !defined(GOLD_DESCRIPTORS_H)