summaryrefslogtreecommitdiff
path: root/library/Process-linux.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-08-01 03:31:52 +0200
committerPetr Mrázek2011-08-01 03:31:52 +0200
commit331ada8f91008cd0232fedeb610e745a966dbae5 (patch)
treed6557b51ff0743434a281c6063424216131bca9c /library/Process-linux.cpp
parenta36d8b0619abb824a0adcc38ab9d3f5a167d1b41 (diff)
downloaddfhack-331ada8f91008cd0232fedeb610e745a966dbae5.tar.gz
dfhack-331ada8f91008cd0232fedeb610e745a966dbae5.tar.bz2
dfhack-331ada8f91008cd0232fedeb610e745a966dbae5.tar.xz
Don't take over console in TEXT mode.
Diffstat (limited to 'library/Process-linux.cpp')
-rw-r--r--library/Process-linux.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/Process-linux.cpp b/library/Process-linux.cpp
index 937bd155..f68fd20b 100644
--- a/library/Process-linux.cpp
+++ b/library/Process-linux.cpp
@@ -181,12 +181,12 @@ int Process::getPID()
bool Process::setPermisions(const t_memrange & range,const t_memrange &trgrange)
{
- int result;
- int protect=0;
- if(trgrange.read)protect|=PROT_READ;
- if(trgrange.write)protect|=PROT_WRITE;
- if(trgrange.execute)protect|=PROT_EXECUTE;
- result=mprotect((void *)range.start, range.end-range.start,protect);
-
- return result==0;
+ int result;
+ int protect=0;
+ if(trgrange.read)protect|=PROT_READ;
+ if(trgrange.write)protect|=PROT_WRITE;
+ if(trgrange.execute)protect|=PROT_EXEC;
+ result=mprotect((void *)range.start, range.end-range.start,protect);
+
+ return result==0;
} \ No newline at end of file