Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
xen
23594-xenpaging_add_helper_function_for_unlinki...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 23594-xenpaging_add_helper_function_for_unlinking_pagefile.patch of Package xen
changeset: 23594:2fe46305a00d user: Olaf Hering <olaf@aepfle.de> date: Fri Jun 10 10:47:25 2011 +0200 files: tools/xenpaging/xenpaging.c description: xenpaging: add helper function for unlinking pagefile Unlink pagefile in the signal handler and also in the exit path. This does not leave a stale pagefile if an error occoured. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com> --- tools/xenpaging/xenpaging.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c =================================================================== --- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.c +++ xen-4.1.2-testing/tools/xenpaging/xenpaging.c @@ -41,11 +41,20 @@ static char filename[80]; static int interrupted; -static void close_handler(int sig) + +static void unlink_pagefile(void) { - interrupted = sig; if ( filename[0] ) + { unlink(filename); + filename[0] = '\0'; + } +} + +static void close_handler(int sig) +{ + interrupted = sig; + unlink_pagefile(); } static int xenpaging_mem_paging_flush_ioemu_cache(xenpaging_t *paging) @@ -716,6 +725,7 @@ int main(int argc, char *argv[]) out: close(fd); + unlink_pagefile(); free(victims); /* Tear down domain paging */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor